mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 14:50:19 +00:00
ASoC: sun4i-codec: Add sun7i_codec_controls, sun7i_codec_codec
Introduce sun7i_codec_controls because some of the controls are different on Allwinner A20 compared to Allwinner A10. Also introduce sun7i_codec_codec in order to use sun7i_codec_controls and make sun7i_codec_quirks use sun7i_codec_codec. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
b5a656030c
commit
b71a7eb56c
@ -686,6 +686,15 @@ static const struct snd_kcontrol_new sun4i_codec_controls[] = {
|
||||
sun4i_codec_micin_loopback_gain_scale),
|
||||
};
|
||||
|
||||
static const struct snd_kcontrol_new sun7i_codec_controls[] = {
|
||||
SOC_SINGLE_TLV("Power Amplifier Volume", SUN4I_CODEC_DAC_ACTL,
|
||||
SUN4I_CODEC_DAC_ACTL_PA_VOL, 0x3F, 0,
|
||||
sun4i_codec_pa_volume_scale),
|
||||
SOC_SINGLE_TLV("Mic Playback Volume", SUN4I_CODEC_DAC_ACTL,
|
||||
SUN4I_CODEC_DAC_ACTL_MICG, 7, 0,
|
||||
sun4i_codec_micin_loopback_gain_scale),
|
||||
};
|
||||
|
||||
static const struct snd_kcontrol_new sun4i_codec_left_mixer_controls[] = {
|
||||
SOC_DAPM_SINGLE("Left DAC Playback Switch", SUN4I_CODEC_DAC_ACTL,
|
||||
SUN4I_CODEC_DAC_ACTL_LDACLMIXS, 1, 0),
|
||||
@ -820,6 +829,19 @@ static const struct snd_soc_component_driver sun4i_codec_codec = {
|
||||
.non_legacy_dai_naming = 1,
|
||||
};
|
||||
|
||||
static const struct snd_soc_component_driver sun7i_codec_codec = {
|
||||
.controls = sun7i_codec_controls,
|
||||
.num_controls = ARRAY_SIZE(sun7i_codec_controls),
|
||||
.dapm_widgets = sun4i_codec_codec_dapm_widgets,
|
||||
.num_dapm_widgets = ARRAY_SIZE(sun4i_codec_codec_dapm_widgets),
|
||||
.dapm_routes = sun4i_codec_codec_dapm_routes,
|
||||
.num_dapm_routes = ARRAY_SIZE(sun4i_codec_codec_dapm_routes),
|
||||
.idle_bias_on = 1,
|
||||
.use_pmdown_time = 1,
|
||||
.endianness = 1,
|
||||
.non_legacy_dai_naming = 1,
|
||||
};
|
||||
|
||||
/*** sun6i Codec ***/
|
||||
|
||||
/* mixer controls */
|
||||
@ -1500,7 +1522,7 @@ static const struct sun4i_codec_quirks sun6i_a31_codec_quirks = {
|
||||
|
||||
static const struct sun4i_codec_quirks sun7i_codec_quirks = {
|
||||
.regmap_config = &sun7i_codec_regmap_config,
|
||||
.codec = &sun4i_codec_codec,
|
||||
.codec = &sun7i_codec_codec,
|
||||
.create_card = sun4i_codec_create_card,
|
||||
.reg_adc_fifoc = REG_FIELD(SUN4I_CODEC_ADC_FIFOC, 0, 31),
|
||||
.reg_dac_txdata = SUN4I_CODEC_DAC_TXDATA,
|
||||
|
Loading…
x
Reference in New Issue
Block a user