alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch
@ 2016-03-02  9:18 John Lin
  2016-03-02 10:35 ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: John Lin @ 2016-03-02  9:18 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: oder_chiou, alsa-devel, John Lin, bardliao, zhengsq, flove

Add kcontrol for headphone channel switch.

Signed-off-by: John Lin <john.lin@realtek.com>
---
 sound/soc/codecs/rt5616.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c
index 3704d07..b370993 100644
--- a/sound/soc/codecs/rt5616.c
+++ b/sound/soc/codecs/rt5616.c
@@ -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 */
-- 
1.8.1.1.439.g50a6b54

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch
  2016-03-02  9:18 [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch John Lin
@ 2016-03-02 10:35 ` Mark Brown
  2016-03-03  2:45   ` John Lin
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2016-03-02 10:35 UTC (permalink / raw)
  To: John Lin; +Cc: oder_chiou, alsa-devel, lgirdwood, bardliao, zhengsq, flove


[-- Attachment #1.1: Type: text/plain, Size: 422 bytes --]

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

>  	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.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch
  2016-03-02 10:35 ` Mark Brown
@ 2016-03-03  2:45   ` John Lin
  2016-03-03  7:21     ` Shunqian Zheng
  2016-03-05  3:51     ` Mark Brown
  0 siblings, 2 replies; 7+ messages in thread
From: John Lin @ 2016-03-03  2:45 UTC (permalink / raw)
  To: Mark Brown
  Cc: Oder Chiou, alsa-devel@alsa-project.org, lgirdwood@gmail.com,
	Bard Liao, zhengsq@rock-chips.com, Flove

> -----Original Message-----
> From: Mark Brown [mailto:broonie@kernel.org]
> Sent: Wednesday, March 02, 2016 6:36 PM
> To: John Lin
> Cc: lgirdwood@gmail.com; alsa-devel@alsa-project.org; Bard Liao; Flove;
> Oder Chiou; zhengsq@rock-chips.com
> Subject: Re: [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch
> 
> On Wed, Mar 02, 2016 at 05:18:40PM +0800, John Lin wrote:
> 
> >  	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'?


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch
  2016-03-03  2:45   ` John Lin
@ 2016-03-03  7:21     ` Shunqian Zheng
  2016-03-05  3:51     ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Shunqian Zheng @ 2016-03-03  7:21 UTC (permalink / raw)
  To: John Lin, Mark Brown
  Cc: Oder Chiou, Bard Liao, alsa-devel@alsa-project.org,
	lgirdwood@gmail.com, Flove

John,

On 2016年03月03日 10:45, John Lin wrote:
>> -----Original Message-----
>> From: Mark Brown [mailto:broonie@kernel.org]
>> Sent: Wednesday, March 02, 2016 6:36 PM
>> To: John Lin
>> Cc: lgirdwood@gmail.com; alsa-devel@alsa-project.org; Bard Liao; Flove;
>> Oder Chiou; zhengsq@rock-chips.com
>> Subject: Re: [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch
>>
>> On Wed, Mar 02, 2016 at 05:18:40PM +0800, John Lin wrote:
>>
>>>   	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'?
In rt5616.c, there is another control named "OUT Channel Switch".
You may want to rename it too.

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


_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch
  2016-03-03  2:45   ` John Lin
  2016-03-03  7:21     ` Shunqian Zheng
@ 2016-03-05  3:51     ` Mark Brown
  2016-03-07  2:35       ` John Lin
  1 sibling, 1 reply; 7+ messages in thread
From: Mark Brown @ 2016-03-05  3:51 UTC (permalink / raw)
  To: John Lin
  Cc: Oder Chiou, alsa-devel@alsa-project.org, lgirdwood@gmail.com,
	Bard Liao, zhengsq@rock-chips.com, Flove


[-- Attachment #1.1: Type: text/plain, Size: 336 bytes --]

On Thu, Mar 03, 2016 at 02:45:32AM +0000, John Lin wrote:

> 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.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch
  2016-03-05  3:51     ` Mark Brown
@ 2016-03-07  2:35       ` John Lin
  2016-03-07  2:45         ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: John Lin @ 2016-03-07  2:35 UTC (permalink / raw)
  To: Mark Brown
  Cc: Oder Chiou, alsa-devel@alsa-project.org, lgirdwood@gmail.com,
	Bard Liao, zhengsq@rock-chips.com, Flove

> -----Original Message-----
> From: Mark Brown [mailto:broonie@kernel.org]
> Sent: Saturday, March 05, 2016 11:52 AM
> To: John Lin
> Cc: lgirdwood@gmail.com; alsa-devel@alsa-project.org; Bard Liao; Flove;
> Oder Chiou; zhengsq@rock-chips.com
> Subject: Re: [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch
> 
> On Thu, Mar 03, 2016 at 02:45:32AM +0000, John Lin wrote:
> 
> > 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.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch
  2016-03-07  2:35       ` John Lin
@ 2016-03-07  2:45         ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2016-03-07  2:45 UTC (permalink / raw)
  To: John Lin
  Cc: Oder Chiou, alsa-devel@alsa-project.org, lgirdwood@gmail.com,
	Bard Liao, zhengsq@rock-chips.com, Flove


[-- Attachment #1.1: Type: text/plain, Size: 635 bytes --]

On Mon, Mar 07, 2016 at 02:35:55AM +0000, John Lin wrote:

> > 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.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-03-07  7:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-02  9:18 [PATCH] ASoC: rt5616: add kcontrol for headphone channel switch John Lin
2016-03-02 10:35 ` Mark Brown
2016-03-03  2:45   ` John Lin
2016-03-03  7:21     ` Shunqian Zheng
2016-03-05  3:51     ` Mark Brown
2016-03-07  2:35       ` John Lin
2016-03-07  2:45         ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).