Re: [alsa-devel] HD-audio regression after commit 34588709af61be1550b4e2bcee5c85d0ac4f34d4
At Sat, 19 Jan 2013 00:33:52 -0500, Miro Hodak wrote:
On Fri, Jan 18, 2013 at 1:45 PM, Takashi Iwai tiwai@suse.de wrote:
OK, thanks for quick tests!
Takashi
Testing latest updates in sound-unstable:
commit f741c8a1f649379f8f3eb81119df2676c46075cf Merge: d821c1e 164a7ad Author: Takashi Iwai tiwai@suse.de Date: Fri Jan 18 18:30:00 2013 +0100
Playback and capture appear to work correctly with one possible caveats:
Item labeled "Front" controls the level of sound through the speakers. I would expect that it would only control sound from front HP. This happens whether Independent HP is on and off.
When you look at other controls, there are "Surround", "Center", and "LFE", and these are mixer controls for other two line-out jacks. In that sense, "Front" is corresponding to the same group, the line out jack.
You have an individual "Headphone" output. Isn't it obvious?
Takashi
On Sat, Jan 19, 2013 at 6:11 AM, Takashi Iwai tiwai@suse.de wrote:
At Sat, 19 Jan 2013 00:33:52 -0500, Miro Hodak wrote:
Testing latest updates in sound-unstable:
commit f741c8a1f649379f8f3eb81119df2676c46075cf Merge: d821c1e 164a7ad Author: Takashi Iwai tiwai@suse.de Date: Fri Jan 18 18:30:00 2013 +0100
Playback and capture appear to work correctly with one possible caveats:
Item labeled "Front" controls the level of sound through the speakers. I would expect that it would only control sound from front HP. This happens whether Independent HP is on and off.
When you look at other controls, there are "Surround", "Center", and "LFE", and these are mixer controls for other two line-out jacks. In that sense, "Front" is corresponding to the same group, the line out jack.
You have an individual "Headphone" output. Isn't it obvious?
Takashi
Not always, most labels are one word long and can be open to different interpretations. In alsamixer, ordering of capture controls is the following:
Master Headphon PCM Front Front Mi Surround Center LFE Side Line Boo S/PDIF S/PDIF D Auto-Mut Independ <Rear Mic>
and thus "Front" is next to "Front Mi" - that should connect at the front I assume - rather then to other outputs at the back. Thus it is very easy to get confused.
Here are outputs as specified in my MB manual and my attempt to pair them to items in alsamixer (Capture only):
MB description Alsa control (capture) BACK PORTS: Line In Line Boost (its boost only, I know) Front Speaker Out Front Mic In Rear Mic Boost Center/Subwoofer Center Rear Speaker Out ??? Side Speaker Out Side
FRONT PORTS: Headphone Out Headphone Front Mic In Front Mic Boost
There are two items that have not been assigned - Surround and LFE, presumably one of them should correspond to the "Rear Speaker Out" for which I could not identify ALSA control. Not being familiar with more than 2-channle audio, I do not know how to assign these.
Testing latest updates in sound-unstable:
commit f741c8a1f649379f8f3eb81119df2676c46075cf Merge: d821c1e 164a7ad Author: Takashi Iwai tiwai@suse.de Date: Fri Jan 18 18:30:00 2013 +0100
Playback and capture appear to work correctly with one possible
caveats:
Item labeled "Front" controls the level of sound through the speakers.
I
would expect that it would only control sound from front HP. This
happens
whether Independent HP is on and off.
When you look at other controls, there are "Surround", "Center", and "LFE", and these are mixer controls for other two line-out jacks. In that sense, "Front" is corresponding to the same group, the line out jack.
You have an individual "Headphone" output. Isn't it obvious?
Not always, most labels are one word long and can be open to different
interpretations. In alsamixer, ordering of capture controls is the following:
Master Headphon PCM Front Front Mi Surround Center LFE
Side Line Boo S/PDIF S/PDIF D Auto-Mut Independ <Rear Mic>
and thus "Front" is next to "Front Mi" - that should connect at the front
I assume - rather then to other outputs at the back. Thus it is very easy to get confused.
Here are outputs as specified in my MB manual and my attempt to pair them
to items in alsamixer (Capture only):
MB description Alsa control (capture) BACK PORTS: Line In Line Boost (its
boost only, I know)
Front Speaker Out Front Mic In Rear Mic Boost Center/Subwoofer Center Rear Speaker Out ??? Side Speaker Out Side
FRONT PORTS: Headphone Out Headphone Front Mic In Front Mic Boost
There are two items that have not been assigned - Surround and LFE,
presumably one of them should correspond to the "Rear Speaker Out" for which I could not identify ALSA control. Not being familiar with more than 2-channle audio, I do not know how to assign these.
Try
speaker-test -D hw:0 -c 8 -t wav
http://git.kernel.org/?p=linux/kernel/git/tiwai/sound.git;a=blob_plain;f=Doc...
http://git.alsa-project.org/?p=alsa-tools.git;a=blob_plain;f=hdajackretask/R...
Your can also use early patching or hda-jack-retask
1)the three stacks model by change the pin default of the black, orange and grey jacks as [N/A] to test the channel mode switch
2) retasking front Mic Jack as another front headphone jack or vice versa
At Sun, 20 Jan 2013 14:54:39 -0500, Miro Hodak wrote:
On Sat, Jan 19, 2013 at 6:11 AM, Takashi Iwai tiwai@suse.de wrote:
At Sat, 19 Jan 2013 00:33:52 -0500, Miro Hodak wrote:
Testing latest updates in sound-unstable:
commit f741c8a1f649379f8f3eb81119df2676c46075cf Merge: d821c1e 164a7ad Author: Takashi Iwai tiwai@suse.de Date: Fri Jan 18 18:30:00 2013 +0100
Playback and capture appear to work correctly with one possible caveats:
Item labeled "Front" controls the level of sound through the speakers. I would expect that it would only control sound from front HP. This happens whether Independent HP is on and off.
When you look at other controls, there are "Surround", "Center", and "LFE", and these are mixer controls for other two line-out jacks. In that sense, "Front" is corresponding to the same group, the line out jack.
You have an individual "Headphone" output. Isn't it obvious?
Takashi
Not always, most labels are one word long and can be open to different interpretations. In alsamixer, ordering of capture controls is the following:
Master Headphon PCM Front Front Mi Surround Center LFE Side Line Boo S/PDIF S/PDIF D Auto-Mut Independ <Rear Mic>
and thus "Front" is next to "Front Mi" - that should connect at the front I assume - rather then to other outputs at the back. Thus it is very easy to get confused.
I see. Yes, the usage of the word "front" has been a problem since long time ago, basically because it can mean two different things: the position of the jack and the channel location. But, this has been so, thus it's no regression to fix urgently.
Here are outputs as specified in my MB manual and my attempt to pair them to items in alsamixer (Capture only):
MB description Alsa control (capture) BACK PORTS: Line In Line Boost (its boost only, I know) Front Speaker Out Front Mic In Rear Mic Boost Center/Subwoofer Center Rear Speaker Out ??? Side Speaker Out Side
FRONT PORTS: Headphone Out Headphone Front Mic In Front Mic Boost
There are two items that have not been assigned - Surround and LFE, presumably one of them should correspond to the "Rear Speaker Out" for which I could not identify ALSA control. Not being familiar with more than 2-channle audio, I do not know how to assign these.
"Surround" corresponds to the rear channel in ALSA term. "LFE" is a more official name of subwoofer.
Takashi
On Mon, Jan 21, 2013 at 3:18 AM, Takashi Iwai tiwai@suse.de wrote:
At Sun, 20 Jan 2013 14:54:39 -0500, Miro Hodak wrote:
Not always, most labels are one word long and can be open to different interpretations. In alsamixer, ordering of capture controls is the following:
Master Headphon PCM Front Front Mi Surround Center LFE Side Line Boo S/PDIF S/PDIF D Auto-Mut Independ <Rear Mic>
and thus "Front" is next to "Front Mi" - that should connect at the
front I
assume - rather then to other outputs at the back. Thus it is very easy
to
get confused.
I see. Yes, the usage of the word "front" has been a problem since long time ago, basically because it can mean two different things: the position of the jack and the channel location. But, this has been so, thus it's no regression to fix urgently.
Here are outputs as specified in my MB manual and my attempt to pair them to items in alsamixer (Capture only):
MB description Alsa control (capture) BACK PORTS: Line In Line Boost (its boost only, I know) Front Speaker Out Front Mic In Rear Mic Boost Center/Subwoofer Center Rear Speaker Out ??? Side Speaker Out Side
FRONT PORTS: Headphone Out Headphone Front Mic In Front Mic Boost
There are two items that have not been assigned - Surround and LFE, presumably one of them should correspond to the "Rear Speaker Out" for which I could not identify ALSA control. Not being familiar with more
than
2-channle audio, I do not know how to assign these.
"Surround" corresponds to the rear channel in ALSA term. "LFE" is a more official name of subwoofer.
Takashi
Thanks for that explanation.
I have been playing with Independent HP feature and while I can get it to work in aplay and mplayer, it does not seem to work on vlc and Skype. Both applications seem to have options for sending sound to HPs ("AD1989B Analog Front Speakers" or "AD1989B Analog (hw: 0,2)" - Skype only), but none of those options sends sound to the HPs. Any thoughts on this?
I have been playing with Independent HP feature and while I can get it to
work in aplay and mplayer, it does not seem to work on vlc and Skype. Both applications seem to have options for sending sound to HPs ("AD1989B Analog Front Speakers" or "AD1989B Analog (hw: 0,2)" - Skype only), but none of those options sends sound to the HPs. Any thoughts on this?
Because the driver should not allow user to change the independent headphone switch when there is any playing stream
On Mon, Jan 21, 2013 at 4:18 AM, Raymond Yau superquad.vortex2@gmail.comwrote:
I have been playing with Independent HP feature and while I can get it
to work in aplay and mplayer, it does not seem to work on vlc and Skype. Both applications seem to have options for sending sound to HPs ("AD1989B Analog Front Speakers" or "AD1989B Analog (hw: 0,2)" - Skype only), but none of those options sends sound to the HPs. Any thoughts on this?
Because the driver should not allow user to change the independent headphone switch when there is any playing stream
The Independent HP switch is on before starting these apps (vlc and Skype).
It would be cool if I could make a skype call via front headset independently of speakers connected at the back, but I cannot get it to work.
At Mon, 21 Jan 2013 12:08:13 -0500, Miro Hodak wrote:
On Mon, Jan 21, 2013 at 4:18 AM, Raymond Yau superquad.vortex2@gmail.comwrote:
I have been playing with Independent HP feature and while I can get it
to work in aplay and mplayer, it does not seem to work on vlc and Skype. Both applications seem to have options for sending sound to HPs ("AD1989B Analog Front Speakers" or "AD1989B Analog (hw: 0,2)" - Skype only), but none of those options sends sound to the HPs. Any thoughts on this?
Because the driver should not allow user to change the independent headphone switch when there is any playing stream
The Independent HP switch is on before starting these apps (vlc and Skype).
Maybe it's because you set it beforehand? The previous mixer state is restored usually upon login or reboot.
Takashi
On Mon, Jan 21, 2013 at 12:29 PM, Takashi Iwai tiwai@suse.de wrote:
At Mon, 21 Jan 2013 12:08:13 -0500, Miro Hodak wrote:
On Mon, Jan 21, 2013 at 4:18 AM, Raymond Yau <
superquad.vortex2@gmail.com>wrote:
I have been playing with Independent HP feature and while I can get
it
to work in aplay and mplayer, it does not seem to work on vlc and
Skype.
Both applications seem to have options for sending sound to HPs
("AD1989B
Analog Front Speakers" or "AD1989B Analog (hw: 0,2)" - Skype only), but none of those options sends sound to the HPs. Any thoughts on this?
Because the driver should not allow user to change the independent headphone switch when there is any playing stream
The Independent HP switch is on before starting these apps (vlc and
Skype).
Maybe it's because you set it beforehand? The previous mixer state is restored usually upon login or reboot.
Takashi
Well, I verify that the Independent HP mode works just before trying these applications so mixer should be in correct state.
On Mon, Jan 21, 2013 at 12:44 PM, Miro Hodak mhodak127@gmail.com wrote:
On Mon, Jan 21, 2013 at 12:29 PM, Takashi Iwai tiwai@suse.de wrote:
At Mon, 21 Jan 2013 12:08:13 -0500, Miro Hodak wrote:
On Mon, Jan 21, 2013 at 4:18 AM, Raymond Yau <
superquad.vortex2@gmail.com>wrote:
I have been playing with Independent HP feature and while I can get
it
to work in aplay and mplayer, it does not seem to work on vlc and
Skype.
Both applications seem to have options for sending sound to HPs
("AD1989B
Analog Front Speakers" or "AD1989B Analog (hw: 0,2)" - Skype only),
but
none of those options sends sound to the HPs. Any thoughts on this?
Because the driver should not allow user to change the independent headphone switch when there is any playing stream
The Independent HP switch is on before starting these apps (vlc and
Skype).
Maybe it's because you set it beforehand? The previous mixer state is restored usually upon login or reboot.
Takashi
Well, I verify that the Independent HP mode works just before trying these applications so mixer should be in correct state.
Actually, it works fine in Skype when using "AD1989B Analog (hw: 0,2)". I was confused because I changed only "Speakers" to that device and tried making a test sound. That did not work, apparently test sound goes to whatever "Ringing" is set to. But when making actual calls, it works as expected and I can take advantage of the Independent HP feature.
At Mon, 21 Jan 2013 14:11:47 -0500, Miro Hodak wrote:
[1 <text/plain; ISO-8859-1 (7bit)>] On Mon, Jan 21, 2013 at 12:44 PM, Miro Hodak mhodak127@gmail.com wrote:
On Mon, Jan 21, 2013 at 12:29 PM, Takashi Iwai tiwai@suse.de wrote:
At Mon, 21 Jan 2013 12:08:13 -0500, Miro Hodak wrote:
On Mon, Jan 21, 2013 at 4:18 AM, Raymond Yau <
superquad.vortex2@gmail.com>wrote:
I have been playing with Independent HP feature and while I can get
it
to work in aplay and mplayer, it does not seem to work on vlc and
Skype.
Both applications seem to have options for sending sound to HPs
("AD1989B
Analog Front Speakers" or "AD1989B Analog (hw: 0,2)" - Skype only),
but
none of those options sends sound to the HPs. Any thoughts on this?
Because the driver should not allow user to change the independent headphone switch when there is any playing stream
The Independent HP switch is on before starting these apps (vlc and
Skype).
Maybe it's because you set it beforehand? The previous mixer state is restored usually upon login or reboot.
Takashi
Well, I verify that the Independent HP mode works just before trying these applications so mixer should be in correct state.
Actually, it works fine in Skype when using "AD1989B Analog (hw: 0,2)". I was confused because I changed only "Speakers" to that device and tried making a test sound. That did not work, apparently test sound goes to whatever "Ringing" is set to. But when making actual calls, it works as expected and I can take advantage of the Independent HP feature.
Hm, there should be nothing to touch the indep-HP mixer control from PCM, so I have no idea why it went wrong.
BTW, I guess we have still an issue regarding indep HP. When it's ON, should the auto-mute be disabled, no? Although one can disable the automute manually, it'd be maybe more user-friendly if the driver does it by itself.
The necessary change would be likely trivial, so I'm going to implement it tomorrow.
Takashi
At Mon, 21 Jan 2013 21:21:45 +0100, Takashi Iwai wrote:
At Mon, 21 Jan 2013 14:11:47 -0500, Miro Hodak wrote:
[1 <text/plain; ISO-8859-1 (7bit)>] On Mon, Jan 21, 2013 at 12:44 PM, Miro Hodak mhodak127@gmail.com wrote:
On Mon, Jan 21, 2013 at 12:29 PM, Takashi Iwai tiwai@suse.de wrote:
At Mon, 21 Jan 2013 12:08:13 -0500, Miro Hodak wrote:
On Mon, Jan 21, 2013 at 4:18 AM, Raymond Yau <
superquad.vortex2@gmail.com>wrote:
> I have been playing with Independent HP feature and while I can get
it
to work in aplay and mplayer, it does not seem to work on vlc and
Skype.
Both applications seem to have options for sending sound to HPs
("AD1989B
Analog Front Speakers" or "AD1989B Analog (hw: 0,2)" - Skype only),
but
none of those options sends sound to the HPs. Any thoughts on this?
Because the driver should not allow user to change the independent headphone switch when there is any playing stream
The Independent HP switch is on before starting these apps (vlc and
Skype).
Maybe it's because you set it beforehand? The previous mixer state is restored usually upon login or reboot.
Takashi
Well, I verify that the Independent HP mode works just before trying these applications so mixer should be in correct state.
Actually, it works fine in Skype when using "AD1989B Analog (hw: 0,2)". I was confused because I changed only "Speakers" to that device and tried making a test sound. That did not work, apparently test sound goes to whatever "Ringing" is set to. But when making actual calls, it works as expected and I can take advantage of the Independent HP feature.
Hm, there should be nothing to touch the indep-HP mixer control from PCM, so I have no idea why it went wrong.
BTW, I guess we have still an issue regarding indep HP. When it's ON, should the auto-mute be disabled, no? Although one can disable the automute manually, it'd be maybe more user-friendly if the driver does it by itself.
The necessary change would be likely trivial, so I'm going to implement it tomorrow.
The patch is below, already merged in test/hda-gen-parser branch (and test/hda-migrate and master branch, too), as usual.
Takashi
--- From: Takashi Iwai tiwai@suse.de Subject: [PATCH] ALSA: hda - Disable HP auto-mute during independent HP mode
Both the HP auto-mute and the independent HP mode conflict with each other. Make HP auto-mute disabled (only for the affected HP jack) during the driver is in HP independent mode.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/hda/hda_generic.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 63d12ef..258fb5e 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -1889,6 +1889,13 @@ static int indep_hp_put(struct snd_kcontrol *kcontrol, *dacp = 0; else *dacp = spec->alt_dac_nid; + + /* update HP auto-mute state too */ + if (spec->hp_automute_hook) + spec->hp_automute_hook(codec, NULL); + else + snd_hda_gen_hp_automute(codec, NULL); + ret = 1; } unlock: @@ -3467,10 +3474,16 @@ static void call_update_outputs(struct hda_codec *codec) void snd_hda_gen_hp_automute(struct hda_codec *codec, struct hda_jack_tbl *jack) { struct hda_gen_spec *spec = codec->spec; + hda_nid_t *pins = spec->autocfg.hp_pins; + int num_pins = ARRAY_SIZE(spec->autocfg.hp_pins); + + /* No detection for the first HP jack during indep-HP mode */ + if (spec->indep_hp_enabled) { + pins++; + num_pins--; + }
- spec->hp_jack_present = - detect_jacks(codec, ARRAY_SIZE(spec->autocfg.hp_pins), - spec->autocfg.hp_pins); + spec->hp_jack_present = detect_jacks(codec, num_pins, pins); if (!spec->detect_hp || (!spec->automute_speaker && !spec->automute_lo)) return; call_update_outputs(codec);
On Tue, Jan 22, 2013 at 2:05 AM, Takashi Iwai tiwai@suse.de wrote:
At Mon, 21 Jan 2013 21:21:45 +0100, Takashi Iwai wrote:
The patch is below, already merged in test/hda-gen-parser branch (and test/hda-migrate and master branch, too), as usual.
Takashi
From: Takashi Iwai tiwai@suse.de Subject: [PATCH] ALSA: hda - Disable HP auto-mute during independent HP mode
Both the HP auto-mute and the independent HP mode conflict with each other. Make HP auto-mute disabled (only for the affected HP jack) during the driver is in HP independent mode.
How is this supposed to work? I upgraded my kernel, and with Independent
HP on Auto-Mute can still be switched on or off in alsamixer.
At Tue, 22 Jan 2013 03:14:10 -0500, Miro Hodak wrote:
On Tue, Jan 22, 2013 at 2:05 AM, Takashi Iwai tiwai@suse.de wrote:
At Mon, 21 Jan 2013 21:21:45 +0100, Takashi Iwai wrote:
The patch is below, already merged in test/hda-gen-parser branch (and test/hda-migrate and master branch, too), as usual.
Takashi
From: Takashi Iwai tiwai@suse.de Subject: [PATCH] ALSA: hda - Disable HP auto-mute during independent HP mode
Both the HP auto-mute and the independent HP mode conflict with each other. Make HP auto-mute disabled (only for the affected HP jack) during the driver is in HP independent mode.
How is this supposed to work? I upgraded my kernel, and with Independent
HP on Auto-Mute can still be switched on or off in alsamixer.
The Auto-mute mode enum mixer is still accessible but it doesn't affect the automute behavior of the HP jack itself. The HP jack is excluded from the automute source during the independent HP mode.
Takashi
On Tue, Jan 22, 2013 at 3:58 AM, Takashi Iwai tiwai@suse.de wrote:
At Tue, 22 Jan 2013 03:14:10 -0500, Miro Hodak wrote:
On Tue, Jan 22, 2013 at 2:05 AM, Takashi Iwai tiwai@suse.de wrote:
At Mon, 21 Jan 2013 21:21:45 +0100, Takashi Iwai wrote:
The patch is below, already merged in test/hda-gen-parser branch (and test/hda-migrate and master branch, too), as usual.
Takashi
From: Takashi Iwai tiwai@suse.de Subject: [PATCH] ALSA: hda - Disable HP auto-mute during independent HP mode
Both the HP auto-mute and the independent HP mode conflict with each other. Make HP auto-mute disabled (only for the affected HP jack) during the driver is in HP independent mode.
How is this supposed to work? I upgraded my kernel, and with
Independent
HP on Auto-Mute can still be switched on or off in alsamixer.
The Auto-mute mode enum mixer is still accessible but it doesn't affect the automute behavior of the HP jack itself. The HP jack is excluded from the automute source during the independent HP mode.
Takashi
Is there a reason to do it this way? It must confusing to users if the option can be changed but it has no effects. For example, Independent HP cannot be changed while sound is being played.
At Tue, 22 Jan 2013 05:06:33 -0500, Miro Hodak wrote:
On Tue, Jan 22, 2013 at 3:58 AM, Takashi Iwai tiwai@suse.de wrote:
At Tue, 22 Jan 2013 03:14:10 -0500, Miro Hodak wrote:
On Tue, Jan 22, 2013 at 2:05 AM, Takashi Iwai tiwai@suse.de wrote:
At Mon, 21 Jan 2013 21:21:45 +0100, Takashi Iwai wrote:
The patch is below, already merged in test/hda-gen-parser branch (and test/hda-migrate and master branch, too), as usual.
Takashi
From: Takashi Iwai tiwai@suse.de Subject: [PATCH] ALSA: hda - Disable HP auto-mute during independent HP mode
Both the HP auto-mute and the independent HP mode conflict with each other. Make HP auto-mute disabled (only for the affected HP jack) during the driver is in HP independent mode.
How is this supposed to work? I upgraded my kernel, and with
Independent
HP on Auto-Mute can still be switched on or off in alsamixer.
The Auto-mute mode enum mixer is still accessible but it doesn't affect the automute behavior of the HP jack itself. The HP jack is excluded from the automute source during the independent HP mode.
Takashi
Is there a reason to do it this way? It must confusing to users if the option can be changed but it has no effects. For example, Independent HP cannot be changed while sound is being played.
The auto-mute option isn't only for one headphone. If you have an extra line-out in addition to built-in speaker, it's still working even if one headphone jack isn't used. Ditto for the case with multiple headphones. The independent HP mode influences only on the first HP jack.
Takashi
participants (3)
-
Miro Hodak
-
Raymond Yau
-
Takashi Iwai