Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1604717
| From | Mylene Josserand <mylene.josserand@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 2/5] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE |
| Date | 2017-03-20 17:00 +0100 |
| Message-ID | <tn7SW-6Ou-27@gated-at.bofh.it> (permalink) |
| References | <tmhrj-30E-3@gated-at.bofh.it> <tmhrj-30E-11@gated-at.bofh.it> <tn3Z0-48j-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Chen-Yu,
On 20/03/2017 12:46, Chen-Yu Tsai wrote:
> On Sat, Mar 18, 2017 at 3:55 PM, Mylène Josserand
> <mylene.josserand@free-electrons.com> wrote:
>> Update the driver to use the new SOC_DAPM_DOUBLE definition
>> on the digital DAC mixer.
>> Update the names accordingly as, when they are shared, the
>> controls are not prefixed with the widget's name anymore.
>>
>> Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
>> ---
>> sound/soc/sunxi/sun8i-codec.c | 45 ++++++++++++++++++++-----------------------
>> 1 file changed, 21 insertions(+), 24 deletions(-)
>>
>> diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
>> index d60f6fbd36a2..107fa8213600 100644
>> --- a/sound/soc/sunxi/sun8i-codec.c
>> +++ b/sound/soc/sunxi/sun8i-codec.c
>> @@ -259,25 +259,20 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
>> return 0;
>> }
>>
>> -static const struct snd_kcontrol_new sun8i_output_left_mixer_controls[] = {
>> - SOC_DAPM_SINGLE("LSlot 0", SUN8I_DAC_MXR_SRC,
>> - SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L, 1, 0),
>> - SOC_DAPM_SINGLE("LSlot 1", SUN8I_DAC_MXR_SRC,
>> - SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L, 1, 0),
>> - SOC_DAPM_SINGLE("DACL", SUN8I_DAC_MXR_SRC,
>> - SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL, 1, 0),
>> - SOC_DAPM_SINGLE("ADCL", SUN8I_DAC_MXR_SRC,
>> - SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL, 1, 0),
>> -};
>> -
>> -static const struct snd_kcontrol_new sun8i_output_right_mixer_controls[] = {
>> - SOC_DAPM_SINGLE("RSlot 0", SUN8I_DAC_MXR_SRC,
>> +static const struct snd_kcontrol_new sun8i_dac_mixer_controls[] = {
>> + SOC_DAPM_DOUBLE("AIF1 Slot 0 Digital DAC Playback Switch",
>> + SUN8I_DAC_MXR_SRC,
>> + SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L,
>> SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA0R, 1, 0),
>> - SOC_DAPM_SINGLE("RSlot 1", SUN8I_DAC_MXR_SRC,
>> + SOC_DAPM_DOUBLE("AIF1 Slot 1 Digital DAC Playback Switch",
>> + SUN8I_DAC_MXR_SRC,
>> + SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L,
>> SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA1R, 1, 0),
>> - SOC_DAPM_SINGLE("DACR", SUN8I_DAC_MXR_SRC,
>> + SOC_DAPM_DOUBLE("AIF2 Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
>> + SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL,
>> SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF2DACR, 1, 0),
>> - SOC_DAPM_SINGLE("ADCR", SUN8I_DAC_MXR_SRC,
>> + SOC_DAPM_DOUBLE("ADC Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
>> + SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL,
>> SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_ADCR, 1, 0),
>> };
>>
>> @@ -293,12 +288,12 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
>> SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
>>
>> /* DAC Mixers */
>> - SND_SOC_DAPM_MIXER("Left DAC Mixer", SND_SOC_NOPM, 0, 0,
>> - sun8i_output_left_mixer_controls,
>> - ARRAY_SIZE(sun8i_output_left_mixer_controls)),
>> - SND_SOC_DAPM_MIXER("Right DAC Mixer", SND_SOC_NOPM, 0, 0,
>> - sun8i_output_right_mixer_controls,
>> - ARRAY_SIZE(sun8i_output_right_mixer_controls)),
>> + SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
>> + sun8i_dac_mixer_controls,
>> + ARRAY_SIZE(sun8i_dac_mixer_controls)),
>> + SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
>> + sun8i_dac_mixer_controls,
>> + ARRAY_SIZE(sun8i_dac_mixer_controls)),
>>
>> /* Clocks */
>> SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
>> @@ -340,8 +335,10 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
>> { "Digital Right DAC", NULL, "DAC" },
>>
>> /* DAC Mixer Routes */
>> - { "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
>> - { "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
>> + { "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
>> + "Digital Left DAC"},
>> + { "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch ",
>
> The extra space fixed in the next patch could be squashed into this
> patch. Otherwise,
Oh, yes, sorry about that.
I will send a V4 with the fixes you pointed me on this series.
Thanks!
Best regards,
--
Mylène Josserand, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/5] ASoC: sun8i-a33 clean-up for 4.11 Mylène Josserand <mylene.josserand@free-electrons.com> - 2017-03-18 09:00 +0100
[PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget Mylène Josserand <mylene.josserand@free-electrons.com> - 2017-03-18 09:00 +0100
Re: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget Chen-Yu Tsai <wens@csie.org> - 2017-03-20 13:50 +0100
Re: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget Mark Brown <broonie@kernel.org> - 2017-03-20 19:30 +0100
Re: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget Mylene Josserand <mylene.josserand@free-electrons.com> - 2017-03-21 08:50 +0100
Re: [PATCH v3 1/5] ASoC: sun8i-codec: Remove analog "HP" widget Mylene Josserand <mylene.josserand@free-electrons.com> - 2017-03-21 10:10 +0100
[PATCH v3 2/5] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE Mylène Josserand <mylene.josserand@free-electrons.com> - 2017-03-18 09:00 +0100
Re: [PATCH v3 2/5] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE Chen-Yu Tsai <wens@csie.org> - 2017-03-20 12:50 +0100
Re: [PATCH v3 2/5] ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE Mylene Josserand <mylene.josserand@free-electrons.com> - 2017-03-20 17:00 +0100
[PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets Mylène Josserand <mylene.josserand@free-electrons.com> - 2017-03-18 10:00 +0100
Re: [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets Mark Brown <broonie@kernel.org> - 2017-03-20 12:50 +0100
Re: [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets Chen-Yu Tsai <wens@csie.org> - 2017-03-20 13:00 +0100
Re: [PATCH v3 5/5] ARM: dts: sun8i: Update audio-routing with renamed widgets Mark Brown <broonie@kernel.org> - 2017-03-20 17:40 +0100
csiph-web