Re: [PATCH] ASoC: rt711-sdca: remove capture switch controls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dne 19. 04. 21 v 8:50 Yang, Libin napsal(a):
> Hi Jaroslav,
> 
>> -----Original Message-----
>> From: Jaroslav Kysela <perex@xxxxxxxx>
>> Sent: 2021年4月19日 14:32
>> To: Yang, Libin <libin.yang@xxxxxxxxx>; Pierre-Louis Bossart <pierre-
>> louis.bossart@xxxxxxxxxxxxxxx>; shumingf@xxxxxxxxxxx; broonie@xxxxxxxxxx;
>> lgirdwood@xxxxxxxxx
>> Cc: oder_chiou@xxxxxxxxxxx; jack.yu@xxxxxxxxxxx; alsa-devel@alsa-
>> project.org; lars@xxxxxxxxxx; derek.fang@xxxxxxxxxxx; flove@xxxxxxxxxxx
>> Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controls
>>
>> Dne 19. 04. 21 v 7:14 Yang, Libin napsal(a):
>>> Hi Pierre,
>>>
>>>
>>>> -----Original Message-----
>>>> From: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
>>>> Sent: 2021年4月15日 19:26
>>>> To: shumingf@xxxxxxxxxxx; broonie@xxxxxxxxxx; lgirdwood@xxxxxxxxx
>>>> Cc: oder_chiou@xxxxxxxxxxx; jack.yu@xxxxxxxxxxx; alsa-devel@alsa-
>>>> project.org; lars@xxxxxxxxxx; Yang, Libin <libin.yang@xxxxxxxxx>;
>>>> derek.fang@xxxxxxxxxxx; flove@xxxxxxxxxxx
>>>> Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controls
>>>>
>>>>
>>>>
>>>> On 4/15/21 4:16 AM, shumingf@xxxxxxxxxxx wrote:
>>>>> From: Shuming Fan <shumingf@xxxxxxxxxxx>
>>>>>
>>>>> The settings of the switch control already set by DAPM event.
>>>>> These switch controls might the user confused why it can't disable
>>>>> the
>>>> capture.
>>>>
>>>> Sorry, not following. This control is used in the alsa-ucm-conf that
>>>> was just merged
>>>>
>>>> https://github.com/alsa-project/alsa-ucm-
>>>> conf/commit/197025656ec456331d1a34357b113913ec3b187f#diff-
>>>>
>> 0e1c627ea89ee148fdb41aa6b3ba7851ba9c20eb43c1b87b9e0ce92164273dc3R
>>>> 7
>>>>
>>>> Is this saying this commit needs to be fixed with a follow-up PR?
>>>> Libin, are you working on this?
>>>
>>> Yes, I will submit a patch for UCM after this patch is merged.
>>>
>>> The background is Jaroslav requires using codec HW kcontrol for
>>> capture volume/switch. Shuming and I worked on it. At first we wanted
>>> to use FU0F to replace PGA kcontrol. But Shuming found FU0F is used in
>> DAPM.
>>> So it is not proper for the capture volume/switch. And Shuming will
>>> remove the FU0F kcontrol.
>>
>> Is switch control name aligned with the volume control name after this
>> change?
> 
> This patch is removing "FU0F Capture Switch". Before this patch,
> there is "FU0F Capture Switch" and "FU0F Capture Volume". After this
> patch is applied, "FU0F Capture Switch" is removed. So the UCM 
> https://github.com/alsa-project/alsa-ucm-conf/blob/57ead84278f641d411e3ccbb5c8a4b64141904ba/ucm2/codecs/rt711-sdca/init.conf#L7
> of "FU0F Capture Switch" setting needs to be removed.
> 
>> I mean "A Capture Switch" + "A Capture Volume" not "A Capture Switch" + "B
>> Capture Volume".
> 
> We couldn't find a proper codec kcontrol for RT711 capture. So we
> have to continue using PGA kcontrol.

It's really confusing then. What does "FU0F Capture Volume" ? It's really
difficult to judge something when I don't know the codec diagram.

Anyway, the switch and volume for the given I/O should have identical name and
they should differ only in the suffix describing the stream and functionality.

						Jaroslav

> 
> Regards,
> Libin
> 
>>
>> 						Jaroslav
>>
>>>
>>> Regards,
>>> Libin
>>>
>>>>
>>>>
>>>>>
>>>>> Signed-off-by: Shuming Fan <shumingf@xxxxxxxxxxx>
>>>>> ---
>>>>>   sound/soc/codecs/rt711-sdca.c | 8 --------
>>>>>   1 file changed, 8 deletions(-)
>>>>>
>>>>> diff --git a/sound/soc/codecs/rt711-sdca.c b/sound/soc/codecs/rt711-
>>>> sdca.c
>>>>> index bfb7f1c8ec8f..2a09c305f4e4 100644
>>>>> --- a/sound/soc/codecs/rt711-sdca.c
>>>>> +++ b/sound/soc/codecs/rt711-sdca.c
>>>>> @@ -652,14 +652,6 @@ static const struct snd_kcontrol_new
>>>> rt711_sdca_snd_controls[] = {
>>>>>   		SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC,
>>>> RT711_SDCA_ENT_USER_FU05, RT711_SDCA_CTL_FU_VOLUME, CH_R),
>>>>>   		0x57, 0x57, 0,
>>>>>   		rt711_sdca_set_gain_get, rt711_sdca_set_gain_put,
>>>> out_vol_tlv),
>>>>> -	SOC_DOUBLE_R("FU1E Capture Switch",
>>>>> -		SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
>>>> RT711_SDCA_ENT_USER_FU1E, RT711_SDCA_CTL_FU_MUTE, CH_L),
>>>>> -		SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
>>>> RT711_SDCA_ENT_USER_FU1E, RT711_SDCA_CTL_FU_MUTE, CH_R),
>>>>> -		0, 1, 1),
>>>>> -	SOC_DOUBLE_R("FU0F Capture Switch",
>>>>> -		SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC,
>>>> RT711_SDCA_ENT_USER_FU0F, RT711_SDCA_CTL_FU_MUTE, CH_L),
>>>>> -		SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC,
>>>> RT711_SDCA_ENT_USER_FU0F, RT711_SDCA_CTL_FU_MUTE, CH_R),
>>>>> -		0, 1, 1),
>>>>>   	SOC_DOUBLE_R_EXT_TLV("FU1E Capture Volume",
>>>>>   		SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
>>>> RT711_SDCA_ENT_USER_FU1E, RT711_SDCA_CTL_FU_VOLUME, CH_L),
>>>>>   		SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
>>>> RT711_SDCA_ENT_USER_FU1E, RT711_SDCA_CTL_FU_VOLUME, CH_R),
>>>>>
>>
>>
>> --
>> Jaroslav Kysela <perex@xxxxxxxx>
>> Linux Sound Maintainer; ALSA Project; Red Hat, Inc.


-- 
Jaroslav Kysela <perex@xxxxxxxx>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux