Skip to contentSkip to conversation

ASoC: rt5616: add kcontrol for headphone channel switch

PATCH In review John Lin 3 participants 7 messages Mar 2, 2016 – Mar 7, 2016

Subsystems (3)
lore
Share & tools
lore

John Lin

author
#0 lore raw

PATCH 1/1 ASoC: rt5616: add kcontrol for headphone channel switch

Add kcontrol for headphone channel switch.

---
 sound/soc/codecs/rt5616.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/rt5616.c +2 -0
index 3704d07..b370993 100644
@@ -309,6 +309,8 @@ static const struct snd_kcontrol_new rt5616_snd_controls[] = {
 	/* Headphone Output Volume */
 	SOC_DOUBLE("HP Playback Switch", RT5616_HP_VOL,
 		   RT5616_L_MUTE_SFT, RT5616_R_MUTE_SFT, 1, 1),
+	SOC_DOUBLE("HP Channel Switch", RT5616_HP_VOL,
+		   RT5616_VOL_L_SFT, RT5616_VOL_R_SFT, 1, 1),
 	SOC_DOUBLE_TLV("HP Playback Volume", RT5616_HP_VOL,
 		       RT5616_L_VOL_SFT, RT5616_R_VOL_SFT, 39, 1, out_vol_tlv),
 	/* OUTPUT Control */
Signature · 1 line
1.8.1.1.439.g50a6b54
maintainer
#1 lore raw

sound/soc/codecs/rt5616.c static const struct snd_kcontrol_new rt5616_snd_controls[] = { · line 313

Quoted 4 lines · John Lin
sound/soc/codecs/rt5616.c +2 -0
 	SOC_DOUBLE("HP Playback Switch", RT5616_HP_VOL,
 		   RT5616_L_MUTE_SFT, RT5616_R_MUTE_SFT, 1, 1),
+	SOC_DOUBLE("HP Channel Switch", RT5616_HP_VOL,
+		   RT5616_VOL_L_SFT, RT5616_VOL_R_SFT, 1, 1),

What does "Channel Switch" mean? It looks like this is a mute control in which case it shoiuld be HP Playback Switch or similar like other mute controls.

author
#2 lore raw
Quoted 10 lines

-----Original Message-----
From: Mark Brown [mailto:[email protected]]
Sent: Wednesday, March 02, 2016 6:36 PM
To: John Lin
Cc: [email protected]; [email protected]; Bard Liao; Flove; Oder Chiou; [email protected]
Subject: Re: [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch

On Wed, Mar 02, 2016 at 05:18:40PM +0800, John Lin wrote:

Quoted 9 lines

sound/soc/codecs/rt5616.c static const struct snd_kcontrol_new rt5616_snd_controls[] = { · line 313

Quoted 4 lines
sound/soc/codecs/rt5616.c +2 -0
 	SOC_DOUBLE("HP Playback Switch", RT5616_HP_VOL,
 		   RT5616_L_MUTE_SFT, RT5616_R_MUTE_SFT, 1, 1),
+	SOC_DOUBLE("HP Channel Switch", RT5616_HP_VOL,
+		   RT5616_VOL_L_SFT, RT5616_VOL_R_SFT, 1, 1),

What does "Channel Switch" mean? It looks like this is a mute control in which case it shoiuld be HP Playback Switch or similar like other mute controls.

Yes, It is another mute control that is missing on current driver. This mute control is for headphone volume mute. Is it OK to rename it to 'Headphone Volume Playback Switch'?

Quoted 1 line

------Please consider the environment before printing this e-mail.

#3 lore raw

John,

Quoted 18 lines · John Lin
Quoted 10 lines

-----Original Message-----
From: Mark Brown [mailto:[email protected]]
Sent: Wednesday, March 02, 2016 6:36 PM
To: John Lin
Cc: [email protected]; [email protected]; Bard Liao; Flove; Oder Chiou; [email protected]
Subject: Re: [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch

On Wed, Mar 02, 2016 at 05:18:40PM +0800, John Lin wrote:

Quoted 8 lines

sound/soc/codecs/rt5616.c static const struct snd_kcontrol_new rt5616_snd_controls[] = { · line 313

Quoted 4 lines

SOC_DOUBLE("HP Playback Switch", RT5616_HP_VOL,
RT5616_L_MUTE_SFT, RT5616_R_MUTE_SFT, 1, 1),

sound/soc/codecs/rt5616.c +2 -0
+	SOC_DOUBLE("HP Channel Switch", RT5616_HP_VOL,
+		   RT5616_VOL_L_SFT, RT5616_VOL_R_SFT, 1, 1),

What does "Channel Switch" mean? It looks like this is a mute control in which case it shoiuld be HP Playback Switch or similar like other mute controls.

Quoted 3 lines

Yes, It is another mute control that is missing on current driver. This mute control is for headphone volume mute. Is it OK to rename it to 'Headphone Volume Playback Switch'?

In rt5616.c, there is another control named "OUT Channel Switch". You may want to rename it too.

- Shunqian

Quoted 5 lines
Quoted 3 lines

------Please consider the environment before printing this e-mail.

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

maintainer
#4 lore raw
In reply to John Lin
Quoted 3 lines · John Lin

Yes, It is another mute control that is missing on current driver. This mute control is for headphone volume mute. Is it OK to rename it to 'Headphone Volume Playback Switch'?

No, you should call it "Headphone Playback Switch". Please see ControlNames.txt for details.

author
#5 lore raw
Quoted 8 lines

-----Original Message-----
From: Mark Brown [mailto:[email protected]]
Sent: Saturday, March 05, 2016 11:52 AM
To: John Lin
Cc: [email protected]; [email protected]; Bard Liao; Flove; Oder Chiou; [email protected]
Subject: Re: [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch

Quoted 8 lines
Quoted 3 lines · John Lin

Yes, It is another mute control that is missing on current driver. This mute control is for headphone volume mute. Is it OK to rename it to 'Headphone Volume Playback Switch'?

No, you should call it "Headphone Playback Switch". Please see ControlNames.txt for details.

The schematic diagram of headphone is such as:

DAC --> HP Vol --> HP Vol Mute --> HP MIX --> HP Mute

The kcontrol named 'Headphone Playback Switch' was in use for 'HP Mute'. The missing kcontrol is 'HP Vol Mute' in schematic diagram. Could you give us advice in this case? Thank you very much.

Quoted 1 line

------Please consider the environment before printing this e-mail.

maintainer
#6 lore raw
Quoted 10 lines · John Lin
Quoted 2 lines

No, you should call it "Headphone Playback Switch". Please see ControlNames.txt for details.

The schematic diagram of headphone is such as:

DAC --> HP Vol --> HP Vol Mute --> HP MIX --> HP Mute

The kcontrol named 'Headphone Playback Switch' was in use for 'HP Mute'. The missing kcontrol is 'HP Vol Mute' in schematic diagram. Could you give us advice in this case? Thank you very much.

My point is that you shouldn't have both Volume and Switch in the same control name. You could for example call them Headphone Switch and Headphone Playback Switch.