ASoC: rt711-sdca: remove capture switch controls
Subsystems (3)
PATCH 1/1 ASoC: rt711-sdca: remove capture switch controls
From: Shuming Fan <[email protected]>
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.
--- sound/soc/codecs/rt711-sdca.c | 8 -------- 1 file changed, 8 deletions(-)
sound/soc/codecs/rt711-sdca.c +0 -8
@@ -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),
Signature · 1 line
2.29.0
Quoted 4 lines · On 4/15/21 4:16 AM, [email protected] wrote:
From: Shuming Fan <[email protected]>
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
Is this saying this commit needs to be fixed with a follow-up PR? Libin, are you working on this?
Quoted 26 lines
Signed-off-by Shuming Fan <[email protected]>--- sound/soc/codecs/rt711-sdca.c | 8 -------- 1 file changed, 8 deletions(-)sound/soc/codecs/rt711-sdca.c +0
-8@@ -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),
Hi Pierre,
Quoted 21 lines
-----Original Message-----
From: Pierre-Louis Bossart <[email protected]>
Sent: 2021年4月15日 19:26
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; alsa-devel@alsa- project.org; [email protected]; Yang, Libin <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controlsQuoted 4 lines · On 4/15/21 4:16 AM, [email protected] wrote:
From: Shuming Fan <[email protected]>
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
Quoted 7 lines
https://github.com/alsa-project/alsa-ucm-
conf/commit/197025656ec456331d1a34357b113913ec3b187f#diff- 0e1c627ea89ee148fdb41aa6b3ba7851ba9c20eb43c1b87b9e0ce92164273dc3R 7Is 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.
Regards,
Libin
Quoted 38 lines
sound/soc/codecs/rt711-
Quoted 9 lines
Signed-off-by Shuming Fan <[email protected]>--- sound/soc/codecs/rt711-sdca.c | 8 -------- 1 file changed, 8 deletions(-)sound/soc/codecs/rt711- renamed from sound/soc/codecs/rt711-sdca.c +0
-0
sdca.csound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new
Quoted 4 lines
index
bfb7f1c8ec8f..2a09c305f4e4100644sound/soc/codecs/rt711-sdca.c +0
-0@@ -652,14 +652,6 @@ static const struct snd_kcontrol_newrt711_sdca_snd_controls[] = {
sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 652
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-0SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC,
RT711_SDCA_ENT_USER_FU05,RT711_SDCA_CTL_FU_VOLUME,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 654
Quoted 2 lines
sound/soc/codecs/rt711-sdca.c +0
-00x57 ,0x57 ,0 , rt711_sdca_set_gain_get, rt711_sdca_set_gain_put,
out_vol_tlv),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 656
Quoted 2 lines
sound/soc/codecs/rt711-sdca.c +0
-2- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 657
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-1- SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
RT711_SDCA_ENT_USER_FU1E,RT711_SDCA_CTL_FU_MUTE,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new rt711_sdca_snd_controls[] = {
Quoted 3 lines
sound/soc/codecs/rt711-sdca.c +0
-3- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 661
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-1- SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC,
RT711_SDCA_ENT_USER_FU0F,RT711_SDCA_CTL_FU_MUTE,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new rt711_sdca_snd_controls[] = {
Quoted 3 lines
sound/soc/codecs/rt711-sdca.c +0
-1- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 657
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-0SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
RT711_SDCA_ENT_USER_FU1E,RT711_SDCA_CTL_FU_VOLUME,CH_R),Quoted 1 line
Jaroslav Kysela
maintainerDne 19. 04. 21 v 7:14 Yang, Libin napsal(a):
Quoted 32 lines
Hi Pierre,
Quoted 21 lines
-----Original Message-----
From: Pierre-Louis Bossart <[email protected]>
Sent: 2021年4月15日 19:26
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; alsa-devel@alsa- project.org; [email protected]; Yang, Libin <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controlsQuoted 4 lines · On 4/15/21 4:16 AM, [email protected] wrote:
From: Shuming Fan <[email protected]>
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
Quoted 7 lines
https://github.com/alsa-project/alsa-ucm-
conf/commit/197025656ec456331d1a34357b113913ec3b187f#diff- 0e1c627ea89ee148fdb41aa6b3ba7851ba9c20eb43c1b87b9e0ce92164273dc3R 7Is this saying this commit needs to be fixed with a follow-up PR? Libin, are you working on this?
Quoted 7 lines
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? I mean "A Capture Switch" + "A Capture Volume" not "A Capture Switch" + "B Capture Volume".
Jaroslav
Quoted 42 lines
Regards,
LibinQuoted 38 lines
sound/soc/codecs/rt711-
Quoted 9 lines
Signed-off-by Shuming Fan <[email protected]>--- sound/soc/codecs/rt711-sdca.c | 8 -------- 1 file changed, 8 deletions(-)sound/soc/codecs/rt711- renamed from sound/soc/codecs/rt711-sdca.c +0
-0
sdca.csound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new
Quoted 4 lines
index
bfb7f1c8ec8f..2a09c305f4e4100644sound/soc/codecs/rt711-sdca.c +0
-0@@ -652,14 +652,6 @@ static const struct snd_kcontrol_newrt711_sdca_snd_controls[] = {
sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 652
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-0SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC,
RT711_SDCA_ENT_USER_FU05,RT711_SDCA_CTL_FU_VOLUME,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 654
Quoted 2 lines
sound/soc/codecs/rt711-sdca.c +0
-00x57 ,0x57 ,0 , rt711_sdca_set_gain_get, rt711_sdca_set_gain_put,
out_vol_tlv),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 656
Quoted 2 lines
sound/soc/codecs/rt711-sdca.c +0
-2- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 657
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-1- SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
RT711_SDCA_ENT_USER_FU1E,RT711_SDCA_CTL_FU_MUTE,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new rt711_sdca_snd_controls[] = {
Quoted 3 lines
sound/soc/codecs/rt711-sdca.c +0
-3- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 661
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-1- SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC,
RT711_SDCA_ENT_USER_FU0F,RT711_SDCA_CTL_FU_MUTE,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new rt711_sdca_snd_controls[] = {
Quoted 3 lines
sound/soc/codecs/rt711-sdca.c +0
-1- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 657
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-0SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
RT711_SDCA_ENT_USER_FU1E,RT711_SDCA_CTL_FU_VOLUME,CH_R),Quoted 1 line
Signature · 2 lines
Jaroslav Kysela <[email protected]> Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
Hi Jaroslav,
Quoted 50 lines
-----Original Message-----
From: Jaroslav Kysela <[email protected]>
Sent: 2021年4月19日 14:32
To: Yang, Libin <[email protected]>; Pierre-Louis Bossart <pierre- [email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; alsa-devel@alsa- project.org; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controlsDne 19. 04. 21 v 7:14 Yang, Libin napsal(a):
Quoted 28 lines
Hi Pierre,
Quoted 25 lines
-----Original Message-----
From: Pierre-Louis Bossart <[email protected]>
Sent: 2021年4月15日 19:26
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; alsa-devel@alsa- project.org; [email protected]; Yang, Libin <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controlsQuoted 5 lines · On 4/15/21 4:16 AM, [email protected] wrote:
From: Shuming Fan <[email protected]>
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
Quoted 10 lines
Quoted 4 lines
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
Quoted 6 lines
DAPM.
Quoted 2 lines
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.
Quoted 2 lines
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.
Regards,
Libin
Quoted 50 lines
Jaroslav
Quoted 42 lines
Regards,
LibinQuoted 38 lines
sound/soc/codecs/rt711-
Quoted 9 lines
Signed-off-by Shuming Fan <[email protected]>--- sound/soc/codecs/rt711-sdca.c | 8 -------- 1 file changed, 8 deletions(-)sound/soc/codecs/rt711- renamed from sound/soc/codecs/rt711-sdca.c +0
-0
sdca.csound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new
Quoted 4 lines
index
bfb7f1c8ec8f..2a09c305f4e4100644sound/soc/codecs/rt711-sdca.c +0
-0@@ -652,14 +652,6 @@ static const struct snd_kcontrol_newrt711_sdca_snd_controls[] = {
sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 652
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-0SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC,
RT711_SDCA_ENT_USER_FU05,RT711_SDCA_CTL_FU_VOLUME,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 654
Quoted 2 lines
sound/soc/codecs/rt711-sdca.c +0
-00x57 ,0x57 ,0 , rt711_sdca_set_gain_get, rt711_sdca_set_gain_put,
out_vol_tlv),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 656
Quoted 2 lines
sound/soc/codecs/rt711-sdca.c +0
-2- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 657
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-1- SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
RT711_SDCA_ENT_USER_FU1E,RT711_SDCA_CTL_FU_MUTE,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new rt711_sdca_snd_controls[] = {
Quoted 3 lines
sound/soc/codecs/rt711-sdca.c +0
-3- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 661
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-1- SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC,
RT711_SDCA_ENT_USER_FU0F,RT711_SDCA_CTL_FU_MUTE,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new rt711_sdca_snd_controls[] = {
Quoted 3 lines
sound/soc/codecs/rt711-sdca.c +0
-1- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 657
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-0SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
RT711_SDCA_ENT_USER_FU1E,RT711_SDCA_CTL_FU_VOLUME,CH_R),Quoted 1 line
--
Jaroslav Kysela <[email protected]>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
Jaroslav Kysela
maintainerDne 19. 04. 21 v 8:50 Yang, Libin napsal(a):
Quoted 65 lines
Hi Jaroslav,
Quoted 50 lines
-----Original Message-----
From: Jaroslav Kysela <[email protected]>
Sent: 2021年4月19日 14:32
To: Yang, Libin <[email protected]>; Pierre-Louis Bossart <pierre- [email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; alsa-devel@alsa- project.org; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controlsDne 19. 04. 21 v 7:14 Yang, Libin napsal(a):
Quoted 28 lines
Hi Pierre,
Quoted 25 lines
-----Original Message-----
From: Pierre-Louis Bossart <[email protected]>
Sent: 2021年4月15日 19:26
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; alsa-devel@alsa- project.org; [email protected]; Yang, Libin <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controlsQuoted 5 lines · On 4/15/21 4:16 AM, [email protected] wrote:
From: Shuming Fan <[email protected]>
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
Quoted 10 lines
Quoted 4 lines
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
Quoted 6 lines
DAPM.
Quoted 2 lines
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.
Quoted 5 lines
Quoted 2 lines
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
Quoted 54 lines
Regards,
LibinQuoted 50 lines
Jaroslav
Quoted 42 lines
Regards,
LibinQuoted 38 lines
sound/soc/codecs/rt711-
Quoted 9 lines
Signed-off-by Shuming Fan <[email protected]>--- sound/soc/codecs/rt711-sdca.c | 8 -------- 1 file changed, 8 deletions(-)sound/soc/codecs/rt711- renamed from sound/soc/codecs/rt711-sdca.c +0
-0
sdca.csound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new
Quoted 4 lines
index
bfb7f1c8ec8f..2a09c305f4e4100644sound/soc/codecs/rt711-sdca.c +0
-0@@ -652,14 +652,6 @@ static const struct snd_kcontrol_newrt711_sdca_snd_controls[] = {
sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 652
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-0SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC,
RT711_SDCA_ENT_USER_FU05,RT711_SDCA_CTL_FU_VOLUME,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 654
Quoted 2 lines
sound/soc/codecs/rt711-sdca.c +0
-00x57 ,0x57 ,0 , rt711_sdca_set_gain_get, rt711_sdca_set_gain_put,
out_vol_tlv),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 656
Quoted 2 lines
sound/soc/codecs/rt711-sdca.c +0
-2- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 657
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-1- SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
RT711_SDCA_ENT_USER_FU1E,RT711_SDCA_CTL_FU_MUTE,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new rt711_sdca_snd_controls[] = {
Quoted 3 lines
sound/soc/codecs/rt711-sdca.c +0
-3- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 661
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-1- SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC,
RT711_SDCA_ENT_USER_FU0F,RT711_SDCA_CTL_FU_MUTE,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new rt711_sdca_snd_controls[] = {
Quoted 3 lines
sound/soc/codecs/rt711-sdca.c +0
-1- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 657
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-0SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
RT711_SDCA_ENT_USER_FU1E,RT711_SDCA_CTL_FU_VOLUME,CH_R),Quoted 1 line
--
Jaroslav Kysela <[email protected]>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
Signature · 2 lines
Jaroslav Kysela <[email protected]> Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
Hi Jaroslav,
Quoted 83 lines
-----Original Message-----
From: Jaroslav Kysela <[email protected]>
Sent: 2021年4月19日 14:57
To: Yang, Libin <[email protected]>; Pierre-Louis Bossart <pierre- [email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; alsa-devel@alsa- project.org; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controlsDne 19. 04. 21 v 8:50 Yang, Libin napsal(a):
Quoted 21 lines
Hi Jaroslav,
Quoted 19 lines
-----Original Message-----
From: Jaroslav Kysela <[email protected]>
Sent: 2021年4月19日 14:32
To: Yang, Libin <[email protected]>; Pierre-Louis Bossart <pierre- [email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; alsa-devel@alsa- project.org; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controlsDne 19. 04. 21 v 7:14 Yang, Libin napsal(a):
Quoted 7 lines
Hi Pierre,
Quoted 4 lines
-----Original Message-----
From: Pierre-Louis Bossart <[email protected]>
Sent: 2021年4月15日 19:26
To: [email protected]; [email protected];Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Cc: [email protected]; [email protected]; alsa-devel@alsa- project.org; [email protected]; Yang, Libin <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controlsQuoted 5 lines · On 4/15/21 4:16 AM, [email protected] wrote:
From: Shuming Fan <[email protected]>
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.
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
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
Quoted 15 lines
Quoted 15 lines
Quoted 11 lines
Quoted 4 lines
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.
Quoted 2 lines
So it is not proper for the capture volume/switch. And Shuming will remove the FU0F kcontrol.
Quoted 7 lines
Quoted 2 lines
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/57ead84278f641d411e
Quoted 3 lines
3ccbb5c8a4b64141904ba/ucm2/codecs/rt711-sdca/init.conf#L7 of "FU0F Capture Switch" setting needs to be removed.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
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.
"FU0F Capture Volume" will still control the volume of rt711 capture. But "FU0F Capture Switch" will be removed. Because DAPM is using this the same node. These is a conflict when we do below:
1. mute "FU0F Capture Switch". And the kcontrol will mute the Corresponding node in codec.
2. use arecord to capture from the rt711-sdca headset
3. DAPM will auto unmute the node which "FU0F Capture Switch" has muted.
4. So we will capture the sound, even "FU0F Capture Switch" shows the state is "muted" (this is wrong)
So Shuming decided to remove the "FU0F Capture Switch" kcontrol.
Quoted 4 lines
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.
We won't touch "CaptureSwitch" and "CaptureVolume" for rt711-sdca.
The patch will be like what I submitted just now:
https://github.com/alsa-project/alsa-ucm-conf/pull/89
Regards,
Libin
Quoted 63 lines
Jaroslav
Quoted 55 lines
Regards,
LibinQuoted 51 lines
Jaroslav
Quoted 43 lines
Regards,
LibinQuoted 39 lines
sound/soc/codecs/rt711-
Quoted 10 lines
Signed-off-by Shuming Fan <[email protected]>--- sound/soc/codecs/rt711-sdca.c | 8 -------- 1 file changed, 8 deletions(-)sound/soc/codecs/rt711- renamed from sound/soc/codecs/rt711-sdca.c +0
-0
sdca.csound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new
Quoted 4 lines
index
bfb7f1c8ec8f..2a09c305f4e4100644sound/soc/codecs/rt711-sdca.c +0
-0@@ -652,14 +652,6 @@ static const struct snd_kcontrol_newrt711_sdca_snd_controls[] = {
sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 652
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-0SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC,
RT711_SDCA_ENT_USER_FU05,RT711_SDCA_CTL_FU_VOLUME,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 654
Quoted 2 lines
sound/soc/codecs/rt711-sdca.c +0
-00x57 ,0x57 ,0 , rt711_sdca_set_gain_get, rt711_sdca_set_gain_put,
out_vol_tlv),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 656
Quoted 2 lines
sound/soc/codecs/rt711-sdca.c +0
-2- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 657
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-1- SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
RT711_SDCA_ENT_USER_FU1E,RT711_SDCA_CTL_FU_MUTE,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new rt711_sdca_snd_controls[] = {
Quoted 3 lines
sound/soc/codecs/rt711-sdca.c +0
-3- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 661
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-1- SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC,
RT711_SDCA_ENT_USER_FU0F,RT711_SDCA_CTL_FU_MUTE,CH_R),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new rt711_sdca_snd_controls[] = {
Quoted 3 lines
sound/soc/codecs/rt711-sdca.c +0
-1- 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),sound/soc/codecs/rt711-sdca.c static const struct snd_kcontrol_new · line 657
Quoted 1 line
sound/soc/codecs/rt711-sdca.c +0
-0SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
RT711_SDCA_ENT_USER_FU1E,RT711_SDCA_CTL_FU_VOLUME,CH_R),Quoted 1 line
--
Jaroslav Kysela <[email protected]>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.--
Jaroslav Kysela <[email protected]>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
Jaroslav Kysela
maintainerDne 19. 04. 21 v 9:17 Yang, Libin napsal(a):
Quoted 105 lines
Hi Jaroslav,
Quoted 83 lines
-----Original Message-----
From: Jaroslav Kysela <[email protected]>
Sent: 2021年4月19日 14:57
To: Yang, Libin <[email protected]>; Pierre-Louis Bossart <pierre- [email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; alsa-devel@alsa- project.org; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controlsDne 19. 04. 21 v 8:50 Yang, Libin napsal(a):
Quoted 21 lines
Hi Jaroslav,
Quoted 19 lines
-----Original Message-----
From: Jaroslav Kysela <[email protected]>
Sent: 2021年4月19日 14:32
To: Yang, Libin <[email protected]>; Pierre-Louis Bossart <pierre- [email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; alsa-devel@alsa- project.org; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controlsDne 19. 04. 21 v 7:14 Yang, Libin napsal(a):
Quoted 7 lines
Hi Pierre,
Quoted 4 lines
-----Original Message-----
From: Pierre-Louis Bossart <[email protected]>
Sent: 2021年4月15日 19:26
To: [email protected]; [email protected];Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Cc: [email protected]; [email protected]; alsa-devel@alsa- project.org; [email protected]; Yang, Libin <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH] ASoC: rt711-sdca: remove capture switch controlsQuoted 5 lines · On 4/15/21 4:16 AM, [email protected] wrote:
From: Shuming Fan <[email protected]>
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.
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
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
Quoted 15 lines
Quoted 15 lines
Quoted 11 lines
Quoted 4 lines
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.
Quoted 2 lines
So it is not proper for the capture volume/switch. And Shuming will remove the FU0F kcontrol.
Quoted 7 lines
Quoted 2 lines
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/57ead84278f641d411e
Quoted 3 lines
3ccbb5c8a4b64141904ba/ucm2/codecs/rt711-sdca/init.conf#L7 of "FU0F Capture Switch" setting needs to be removed.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
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.
"FU0F Capture Volume" will still control the volume of rt711 capture. But "FU0F Capture Switch" will be removed. Because DAPM is using this the same node. These is a conflict when we do below:
1. mute "FU0F Capture Switch". And the kcontrol will mute the Corresponding node in codec.
2. use arecord to capture from the rt711-sdca headset
3. DAPM will auto unmute the node which "FU0F Capture Switch" has muted.
4. So we will capture the sound, even "FU0F Capture Switch" shows the state is "muted" (this is wrong)
Quoted 1 line
So Shuming decided to remove the "FU0F Capture Switch" kcontrol.
I see. In this case, the auto-route settings should differ from the mixer settings. So the mute flag should be logical _OR_ from both DAPM and the mixer settings. And because the codec is able to do the hw mute, why to prevent the export of this feature?
So I propose do do (pseudo code):
struct rt711_sdca_priv {
bool fu0f_dapm_mute;
bool fu0f_mixer_mute;
};/* called from both dapm event and kontrol put callback (on change) */ /* the dapm event and put callback will modify only rt711_sdca_priv fields */ static void set_f0f_mute(rt711_priv)
{
int mute = rt711_priv->fu0f_dapm_mute || rt711_priv->fu0f_mixer_mute;
set_fu0f_mute_register(mute);
}With this implementation, all is consistent to the user space.
Quoted 5 lines
Quoted 3 lines
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.
We won't touch "CaptureSwitch" and "CaptureVolume" for rt711-sdca.
Yes, but the hw controls should be used instead DSP controls, if they are available.
Jaroslav
Signature · 2 lines
Jaroslav Kysela <[email protected]> Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
Hi Jaroslav,
Quoted 82 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines · On 4/15/21 4:16 AM, [email protected] wrote:
Quoted 5 lines
From: Shuming Fan <[email protected]>
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.
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
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
Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 11 lines
Quoted 11 lines
Quoted 4 lines
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
Quoted 6 lines
DAPM.
Quoted 2 lines
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-Quoted 5 lines
Quoted 5 lines
conf/blob/57ead84278f641d411e
Quoted 4 lines
3ccbb5c8a4b64141904ba/ucm2/codecs/rt711-sdca/init.conf#L7 of "FU0F Capture Switch" setting needs to be removed.
Quoted 1 line
I mean "A Capture Switch" + "A Capture Volume" not "A Capture
Switch"
Quoted 19 lines
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
+ "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.
"FU0F Capture Volume" will still control the volume of rt711 capture. But "FU0F Capture Switch" will be removed. Because DAPM is using this the same node. These is a conflict when we do below:
1. mute "FU0F Capture Switch". And the kcontrol will mute the Corresponding node in codec.
2. use arecord to capture from the rt711-sdca headset 3. DAPM will auto unmute the node which "FU0F Capture Switch" has muted.
4. So we will capture the sound, even "FU0F Capture Switch" shows the state is "muted" (this is wrong)Quoted 1 line
So Shuming decided to remove the "FU0F Capture Switch" kcontrol.
I see. In this case, the auto-route settings should differ from the mixer settings. So the mute flag should be logical _OR_ from both DAPM and the mixer settings. And because the codec is able to do the hw mute, why to prevent the export of this feature?
So I propose do do (pseudo code):
struct rt711_sdca_priv { bool fu0f_dapm_mute; bool fu0f_mixer_mute; };/* called from both dapm event and kontrol put callback (on change) */ /* the dapm event and put callback will modify only
rt711_sdca_privfields */
Quoted 7 lines
static void set_f0f_mute(rt711_priv) { int mute = rt711_priv->fu0f_dapm_mute || rt711_priv-Quoted 1 line
fu0f_mixer_mute;set_fu0f_mute_register(mute); }With this implementation, all is consistent to the user space.
If so:
When capture, if user setting is mute, it will always mute and if user setting is unmute, it will always unmute.
When stop capture, it will always mute regardless the user setting.
Shuming, what do you think?
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
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.
We won't touch "CaptureSwitch" and "CaptureVolume" for rt711-sdca.
Yes, but the hw controls should be used instead DSP controls, if they are available.
Yes, we will try to use the codec hw controls instead of the DSP controls.
Regards,
Libin
Quoted 22 lines
Quoted 14 lines
I see. In this case, the auto-route settings should differ from the mixer settings. So the mute flag should be logical _OR_ from both DAPM and the mixer settings. And because the codec is able to do the hw mute, why to prevent the export of this feature?
So I propose do do (pseudo code):
struct rt711_sdca_priv { bool fu0f_dapm_mute; bool fu0f_mixer_mute; };/* called from both dapm event and kontrol put callback (on change) */ /* the dapm event and put callback will modify only
rt711_sdca_privQuoted 7 lines
fields */ static void set_f0f_mute(rt711_priv) { int mute = rt711_priv->fu0f_dapm_mute || rt711_priv-Quoted 1 line
fu0f_mixer_mute;set_fu0f_mute_register(mute); }With this implementation, all is consistent to the user space.
Quoted 7 lines
If so:
When capture, if user setting is mute, it will always mute and if user setting is unmute, it will always unmute.When stop capture, it will always mute regardless the user setting.
Shuming, what do you think?
I think the function could mute/unmute both. It could avoid that the setting always mutes if the user setting is unmute. e.g.
static void set_fu0f_capture_ctl(rt711_priv) {
int mute = rt711_priv->fu0f_dapm_mute || rt711_priv->fu0f_mixer_mute;
if (mute)
set_fu0f_mute_register();
else
set_fu0f_unmute_register();
}Hi Jaroslav,
Thanks for your suggestions. After the testing, I will send the v2 version.
Quoted 15 lines
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
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.
We won't touch "CaptureSwitch" and "CaptureVolume" for rt711-sdca.
Yes, but the hw controls should be used instead DSP controls, if they are available.
Yes, we will try to use the codec hw controls instead of the DSP controls.
Regards,
Libin
------Please consider the environment before printing this e-mail.
Jaroslav Kysela
maintainerDne 20. 04. 21 v 3:10 Shuming [范書銘] napsal(a):
Quoted 32 lines
Quoted 22 lines
Quoted 14 lines
I see. In this case, the auto-route settings should differ from the mixer settings. So the mute flag should be logical _OR_ from both DAPM and the mixer settings. And because the codec is able to do the hw mute, why to prevent the export of this feature?
So I propose do do (pseudo code):
struct rt711_sdca_priv { bool fu0f_dapm_mute; bool fu0f_mixer_mute; };/* called from both dapm event and kontrol put callback (on change) */ /* the dapm event and put callback will modify only
rt711_sdca_privQuoted 7 lines
fields */ static void set_f0f_mute(rt711_priv) { int mute = rt711_priv->fu0f_dapm_mute || rt711_priv-Quoted 1 line
fu0f_mixer_mute;set_fu0f_mute_register(mute); }With this implementation, all is consistent to the user space.
Quoted 7 lines
If so:
When capture, if user setting is mute, it will always mute and if user setting is unmute, it will always unmute.When stop capture, it will always mute regardless the user setting.
Shuming, what do you think?
I think the function could mute/unmute both. It could avoid that the setting always mutes if the user setting is unmute. e.g.
Quoted 7 lines
static void set_fu0f_capture_ctl(rt711_priv) {
int mute = rt711_priv->fu0f_dapm_mute || rt711_priv->fu0f_mixer_mute;
if (mute)
set_fu0f_mute_register();
else
set_fu0f_unmute_register();
}Yes, I passed the mute value in the pseudo code to the set_fu0f_mute_register() function as argument for the further evaluation, but I meant exactly this.
Thank you,
Jaroslav
Signature · 2 lines
Jaroslav Kysela <[email protected]> Linux Sound Maintainer; ALSA Project; Red Hat, Inc.