All of lore.kernel.org
 help / color / mirror / Atom feed
* hda question: 'Headphone Playback Switch' cannot unmute the pin's output amplifier?
@ 2013-06-05 11:06 Lin, Mengdong
  2013-06-05 11:34 ` David Henningsson
  0 siblings, 1 reply; 6+ messages in thread
From: Lin, Mengdong @ 2013-06-05 11:06 UTC (permalink / raw)
  To: alsa-devel@alsa-project.org, Wang, Xingchao, Girdwood, Liam R

Hi,

I'm using a Realtek HD-A codec ALC282. But the headphone output amplifier is always muted and I cannot unmute it by amixer.

I tried to unmute the pin via control 'Headphone Playback Switch', but snd_hda_mixer_amp_switch_put() gets a ZERO value from ucontrol->value.integer.value, thus the pin will be muted.
Could somebody give me some tips to further check this issue? Many thanks!

Here are the headphone pin info:
Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Headphone Jack", index=0, device=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0000001c: OUT HP Detect
  Pin Default 0x0321401f: [Jack] HP Out at Ext Left
    Conn = 1/8, Color = Green
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x0c 0x0d*

Here is the pin's controls listed by amixer:
numid=2,iface=MIXER,name='Headphone Playback Switch'

Then I use this command to unmute the pin's amplifier:
amixer -c 1 cset numid=2,iface=MIXER,name='Headphone Playback Switch' on

My debug message show that snd_hda_mixer_amp_switch_put() gets zero value , indicating to 'mute':
[  346.263519] snd_hda_mixer_amp_switch_put: nid 0x0021, chs 3, control value [0x00000000, 0x00000000]
[  346.263527] snd_hda_codec_amp_update: nid 0x0021
[  346.263532] codec_amp_update: nid 0x0021, ch 0, direction 1 (OUT 1), index 0, val 0x00000080
[  346.263536] codec_amp_update: amp val not change
[  346.263538] snd_hda_codec_amp_update: nid 0x0021
[  346.263542] codec_amp_update: nid 0x0021, ch 1, direction 1 (OUT 1), index 0, val 0x00000080
[  346.263544] codec_amp_update: amp val not change

Thanks
Mengdong

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

* Re: hda question: 'Headphone Playback Switch' cannot unmute the pin's output amplifier?
  2013-06-05 11:06 hda question: 'Headphone Playback Switch' cannot unmute the pin's output amplifier? Lin, Mengdong
@ 2013-06-05 11:34 ` David Henningsson
  2013-06-06  5:39   ` Lin, Mengdong
  0 siblings, 1 reply; 6+ messages in thread
From: David Henningsson @ 2013-06-05 11:34 UTC (permalink / raw)
  To: Lin, Mengdong
  Cc: alsa-devel@alsa-project.org, Girdwood, Liam R, Wang, Xingchao

On 06/05/2013 01:06 PM, Lin, Mengdong wrote:
> Hi,
>
> I'm using a Realtek HD-A codec ALC282. But the headphone output amplifier is always muted and I cannot unmute it by amixer.
>
> I tried to unmute the pin via control 'Headphone Playback Switch', but snd_hda_mixer_amp_switch_put() gets a ZERO value from ucontrol->value.integer.value, thus the pin will be muted.
> Could somebody give me some tips to further check this issue? Many thanks!

Maybe there's also a "Master playback switch" that needs to be turned on 
as well?

>
> Here are the headphone pin info:
> Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
>    Control: name="Headphone Playback Switch", index=0, device=0
>      ControlAmp: chs=3, dir=Out, idx=0, ofs=0
>    Control: name="Headphone Jack", index=0, device=0
>    Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>    Amp-Out vals:  [0x80 0x80]
>    Pincap 0x0000001c: OUT HP Detect
>    Pin Default 0x0321401f: [Jack] HP Out at Ext Left
>      Conn = 1/8, Color = Green
>      DefAssociation = 0x1, Sequence = 0xf
>    Pin-ctls: 0xc0: OUT HP
>    Unsolicited: tag=01, enabled=1
>    Power states:  D0 D1 D2 D3 EPSS
>    Power: setting=D0, actual=D0
>    Connection: 2
>       0x0c 0x0d*
>
> Here is the pin's controls listed by amixer:
> numid=2,iface=MIXER,name='Headphone Playback Switch'
>
> Then I use this command to unmute the pin's amplifier:
> amixer -c 1 cset numid=2,iface=MIXER,name='Headphone Playback Switch' on
>
> My debug message show that snd_hda_mixer_amp_switch_put() gets zero value , indicating to 'mute':
> [  346.263519] snd_hda_mixer_amp_switch_put: nid 0x0021, chs 3, control value [0x00000000, 0x00000000]
> [  346.263527] snd_hda_codec_amp_update: nid 0x0021
> [  346.263532] codec_amp_update: nid 0x0021, ch 0, direction 1 (OUT 1), index 0, val 0x00000080
> [  346.263536] codec_amp_update: amp val not change
> [  346.263538] snd_hda_codec_amp_update: nid 0x0021
> [  346.263542] codec_amp_update: nid 0x0021, ch 1, direction 1 (OUT 1), index 0, val 0x00000080
> [  346.263544] codec_amp_update: amp val not change
>
> Thanks
> Mengdong
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>



-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

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

* Re: hda question: 'Headphone Playback Switch' cannot unmute the pin's output amplifier?
  2013-06-05 11:34 ` David Henningsson
@ 2013-06-06  5:39   ` Lin, Mengdong
  2013-06-06  9:01     ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Lin, Mengdong @ 2013-06-06  5:39 UTC (permalink / raw)
  To: David Henningsson
  Cc: alsa-devel@alsa-project.org, Girdwood, Liam R, Wang, Xingchao

> -----Original Message-----
> From: David Henningsson [mailto:david.henningsson@canonical.com]
> Sent: Wednesday, June 05, 2013 7:34 PM
 
> On 06/05/2013 01:06 PM, Lin, Mengdong wrote:
> > Hi,
> >
> > I'm using a Realtek HD-A codec ALC282. But the headphone output amplifier is
> always muted and I cannot unmute it by amixer.
> >
> > I tried to unmute the pin via control 'Headphone Playback Switch', but
> snd_hda_mixer_amp_switch_put() gets a ZERO value from
> ucontrol->value.integer.value, thus the pin will be muted.
> > Could somebody give me some tips to further check this issue? Many thanks!
> 
> Maybe there's also a "Master playback switch" that needs to be turned on as
> well?

Many thanks, David! This works. I need to turn on "Master playback switch" as well.

And could you give me some info about the relationship of "Master playback switch", "Headphone Playback Switch" and "Speaker Playback switch"?
I observed a close binding between "Master playback switch" and "Headphone Playback Switch": if I turn off one, then both will be turned off. It looks strange.
But the "Speaker Playback Switch" is independent from "Master playback switch": It can be turn on/off without affecting the "Master". 
Both "Speaker Playback Switch" and "Headphone Playback Switch" are implemented by a output pin, why "Master" seems to be tied to "Headphone"?

Is this behavior a designed result, user preference, or codec H/W restriction?

Thanks
Mengdong

> >
> > Here are the headphone pin info:
> > Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
> >    Control: name="Headphone Playback Switch", index=0, device=0
> >      ControlAmp: chs=3, dir=Out, idx=0, ofs=0
> >    Control: name="Headphone Jack", index=0, device=0
> >    Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
> >    Amp-Out vals:  [0x80 0x80]
> >    Pincap 0x0000001c: OUT HP Detect
> >    Pin Default 0x0321401f: [Jack] HP Out at Ext Left
> >      Conn = 1/8, Color = Green
> >      DefAssociation = 0x1, Sequence = 0xf
> >    Pin-ctls: 0xc0: OUT HP
> >    Unsolicited: tag=01, enabled=1
> >    Power states:  D0 D1 D2 D3 EPSS
> >    Power: setting=D0, actual=D0
> >    Connection: 2
> >       0x0c 0x0d*
> >
> > Here is the pin's controls listed by amixer:
> > numid=2,iface=MIXER,name='Headphone Playback Switch'
> >
> > Then I use this command to unmute the pin's amplifier:
> > amixer -c 1 cset numid=2,iface=MIXER,name='Headphone Playback Switch'
> > on
> >
> > My debug message show that snd_hda_mixer_amp_switch_put() gets zero
> value , indicating to 'mute':
> > [  346.263519] snd_hda_mixer_amp_switch_put: nid 0x0021, chs 3,
> > control value [0x00000000, 0x00000000] [  346.263527]
> > snd_hda_codec_amp_update: nid 0x0021 [  346.263532]
> codec_amp_update:
> > nid 0x0021, ch 0, direction 1 (OUT 1), index 0, val 0x00000080 [
> > 346.263536] codec_amp_update: amp val not change [  346.263538]
> > snd_hda_codec_amp_update: nid 0x0021 [  346.263542]
> codec_amp_update:
> > nid 0x0021, ch 1, direction 1 (OUT 1), index 0, val 0x00000080 [
> > 346.263544] codec_amp_update: amp val not change
> >
> > Thanks
> > Mengdong
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel@alsa-project.org
> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> >
> 
> 
> 
> --
> David Henningsson, Canonical Ltd.
> https://launchpad.net/~diwic

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

* Re: hda question: 'Headphone Playback Switch' cannot unmute the pin's output amplifier?
  2013-06-06  5:39   ` Lin, Mengdong
@ 2013-06-06  9:01     ` Takashi Iwai
  2013-06-06 10:34       ` Lin, Mengdong
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2013-06-06  9:01 UTC (permalink / raw)
  To: Lin, Mengdong
  Cc: alsa-devel@alsa-project.org, Wang, Xingchao, Girdwood, Liam R,
	David Henningsson

At Thu, 6 Jun 2013 05:39:00 +0000,
Lin, Mengdong wrote:
> 
> > -----Original Message-----
> > From: David Henningsson [mailto:david.henningsson@canonical.com]
> > Sent: Wednesday, June 05, 2013 7:34 PM
>  
> > On 06/05/2013 01:06 PM, Lin, Mengdong wrote:
> > > Hi,
> > >
> > > I'm using a Realtek HD-A codec ALC282. But the headphone output amplifier is
> > always muted and I cannot unmute it by amixer.
> > >
> > > I tried to unmute the pin via control 'Headphone Playback Switch', but
> > snd_hda_mixer_amp_switch_put() gets a ZERO value from
> > ucontrol->value.integer.value, thus the pin will be muted.
> > > Could somebody give me some tips to further check this issue? Many thanks!
> > 
> > Maybe there's also a "Master playback switch" that needs to be turned on as
> > well?
> 
> Many thanks, David! This works. I need to turn on "Master playback switch" as well.
> 
> And could you give me some info about the relationship of "Master playback switch", "Headphone Playback Switch" and "Speaker Playback switch"?
> I observed a close binding between "Master playback switch" and "Headphone Playback Switch": if I turn off one, then both will be turned off. It looks strange.
> But the "Speaker Playback Switch" is independent from "Master playback switch": It can be turn on/off without affecting the "Master". 
> Both "Speaker Playback Switch" and "Headphone Playback Switch" are implemented by a output pin, why "Master" seems to be tied to "Headphone"?

Master is master.  If it's turned off, all belongings will be off.
That is, if Master is muted, both speaker and headphone outputs are
muted no matter what Speaker or Headphone element is set.

In the driver level, it must be have so.  If not, it's a bug.
But for verifying the driver behavior, you should check without
PulseAudio; PA may mute/unmute the active/inactive mixer elements
dynamically.


Takashi

> Is this behavior a designed result, user preference, or codec H/W restriction?
> 
> Thanks
> Mengdong
> 
> > >
> > > Here are the headphone pin info:
> > > Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
> > >    Control: name="Headphone Playback Switch", index=0, device=0
> > >      ControlAmp: chs=3, dir=Out, idx=0, ofs=0
> > >    Control: name="Headphone Jack", index=0, device=0
> > >    Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
> > >    Amp-Out vals:  [0x80 0x80]
> > >    Pincap 0x0000001c: OUT HP Detect
> > >    Pin Default 0x0321401f: [Jack] HP Out at Ext Left
> > >      Conn = 1/8, Color = Green
> > >      DefAssociation = 0x1, Sequence = 0xf
> > >    Pin-ctls: 0xc0: OUT HP
> > >    Unsolicited: tag=01, enabled=1
> > >    Power states:  D0 D1 D2 D3 EPSS
> > >    Power: setting=D0, actual=D0
> > >    Connection: 2
> > >       0x0c 0x0d*
> > >
> > > Here is the pin's controls listed by amixer:
> > > numid=2,iface=MIXER,name='Headphone Playback Switch'
> > >
> > > Then I use this command to unmute the pin's amplifier:
> > > amixer -c 1 cset numid=2,iface=MIXER,name='Headphone Playback Switch'
> > > on
> > >
> > > My debug message show that snd_hda_mixer_amp_switch_put() gets zero
> > value , indicating to 'mute':
> > > [  346.263519] snd_hda_mixer_amp_switch_put: nid 0x0021, chs 3,
> > > control value [0x00000000, 0x00000000] [  346.263527]
> > > snd_hda_codec_amp_update: nid 0x0021 [  346.263532]
> > codec_amp_update:
> > > nid 0x0021, ch 0, direction 1 (OUT 1), index 0, val 0x00000080 [
> > > 346.263536] codec_amp_update: amp val not change [  346.263538]
> > > snd_hda_codec_amp_update: nid 0x0021 [  346.263542]
> > codec_amp_update:
> > > nid 0x0021, ch 1, direction 1 (OUT 1), index 0, val 0x00000080 [
> > > 346.263544] codec_amp_update: amp val not change
> > >
> > > Thanks
> > > Mengdong
> > > _______________________________________________
> > > Alsa-devel mailing list
> > > Alsa-devel@alsa-project.org
> > > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> > >
> > 
> > 
> > 
> > --
> > David Henningsson, Canonical Ltd.
> > https://launchpad.net/~diwic
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

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

* Re: hda question: 'Headphone Playback Switch' cannot unmute the pin's output amplifier?
  2013-06-06  9:01     ` Takashi Iwai
@ 2013-06-06 10:34       ` Lin, Mengdong
  2013-06-06 11:49         ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Lin, Mengdong @ 2013-06-06 10:34 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel@alsa-project.org, Wang, Xingchao, Girdwood, Liam R,
	David Henningsson

> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Thursday, June 06, 2013 5:02 PM

> At Thu, 6 Jun 2013 05:39:00 +0000,
> Lin, Mengdong wrote:
> >
> > And could you give me some info about the relationship of "Master playback
> switch", "Headphone Playback Switch" and "Speaker Playback switch"?
> > I observed a close binding between "Master playback switch" and "Headphone
> Playback Switch": if I turn off one, then both will be turned off. It looks strange.
> > But the "Speaker Playback Switch" is independent from "Master playback
> switch": It can be turn on/off without affecting the "Master".
> > Both "Speaker Playback Switch" and "Headphone Playback Switch" are
> implemented by a output pin, why "Master" seems to be tied to "Headphone"?
> 
> Master is master.  If it's turned off, all belongings will be off.
> That is, if Master is muted, both speaker and headphone outputs are muted no
> matter what Speaker or Headphone element is set.

Thanks for clarification, Takashi!

Is this master-slave logic implemented in ALSA driver or lib?
 
> In the driver level, it must be have so.  If not, it's a bug.
> But for verifying the driver behavior, you should check without PulseAudio; PA
> may mute/unmute the active/inactive mixer elements dynamically.

I don't have pulseaudio running. 

Thanks
Mengdong

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

* Re: hda question: 'Headphone Playback Switch' cannot unmute the pin's output amplifier?
  2013-06-06 10:34       ` Lin, Mengdong
@ 2013-06-06 11:49         ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2013-06-06 11:49 UTC (permalink / raw)
  To: Lin, Mengdong
  Cc: alsa-devel@alsa-project.org, Wang, Xingchao, Girdwood, Liam  R,
	David Henningsson

At Thu, 6 Jun 2013 10:34:36 +0000,
Lin, Mengdong wrote:
> 
> > -----Original Message-----
> > From: Takashi Iwai [mailto:tiwai@suse.de]
> > Sent: Thursday, June 06, 2013 5:02 PM
> 
> > At Thu, 6 Jun 2013 05:39:00 +0000,
> > Lin, Mengdong wrote:
> > >
> > > And could you give me some info about the relationship of "Master playback
> > switch", "Headphone Playback Switch" and "Speaker Playback switch"?
> > > I observed a close binding between "Master playback switch" and "Headphone
> > Playback Switch": if I turn off one, then both will be turned off. It looks strange.
> > > But the "Speaker Playback Switch" is independent from "Master playback
> > switch": It can be turn on/off without affecting the "Master".
> > > Both "Speaker Playback Switch" and "Headphone Playback Switch" are
> > implemented by a output pin, why "Master" seems to be tied to "Headphone"?
> > 
> > Master is master.  If it's turned off, all belongings will be off.
> > That is, if Master is muted, both speaker and headphone outputs are muted no
> > matter what Speaker or Headphone element is set.
> 
> Thanks for clarification, Takashi!
> 
> Is this master-slave logic implemented in ALSA driver or lib?

It's purely in the driver.


Takashi

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

end of thread, other threads:[~2013-06-06 11:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-05 11:06 hda question: 'Headphone Playback Switch' cannot unmute the pin's output amplifier? Lin, Mengdong
2013-06-05 11:34 ` David Henningsson
2013-06-06  5:39   ` Lin, Mengdong
2013-06-06  9:01     ` Takashi Iwai
2013-06-06 10:34       ` Lin, Mengdong
2013-06-06 11:49         ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.