Bug 637263

Summary: Headphones do not mute speakers, microphone does not work correctly
Product: [openSUSE] openSUSE 11.3 Reporter: Peter Krútel <peter.krutel>
Component: SoundAssignee: Takashi Iwai <tiwai>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P3 - Medium    
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: alsa-info.txt
alsa-info_20100909.txt
All unplugged, internal speakers and internal microphone working
Headphones in A, internal speakers muted, headphones does not work.
Headphones in B, internal speakers muted, headphones work.
Microphone in A works.
Microphone in B does not work, "recording" noise presented.

Description Peter Krútel 2010-09-06 06:39:12 UTC
Created attachment 387692 [details]
alsa-info.txt

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; sk; rv:1.9.2.8) Gecko/20100723 SUSE/3.6.8-1.3 Firefox/3.6.8

Using opensuse 11.3 on Fujitsu Siemens Celsius H270. I have two possibilities, how to connect headphones and microphone

A. Connectors directly on notebook (in front part)
B. Connectors on port replicator

With default model option (empty string):
When connecting headphones to A, speakers are not muted.
When connecting headphones to B, speakers are muted

My codec is Realtek ALC262 and I have tested all model options for this codec (taken from file HD-Audio-Models.txt), but I have never get the situation, that in both connection possibilites speakers are muted. (e.g. sony-assamd mutes connection A, but does not not mute connection B)

Another problem is, that with default model option (empty string) in connection B external microphone does not work (trying also all possibilities in all 3 'Input Source'.  In connection A external microphone works).


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Actual Results:  
Headphones and microphone does not work correctly in all possible connection possibilities on given notebook.

Expected Results:  
Headhphones and microphone working correctly on given notebook.

I've installed SW from mutimedia libraries/kernel modules repositories too and here is my actual SW configuration:

# rpm -qa '*alsa*'
alsa-driver-kmp-default-1.0.23.20100903_k2.6.34.0_12-1.1.x86_64
alsa-oss-1.0.17-53.1.x86_64
alsa-plugins-32bit-1.0.23-31.1.x86_64
alsa-1.0.23-67.1.x86_64
alsa-plugins-pulse-32bit-1.0.23-31.1.x86_64
java-1_6_0-sun-alsa-1.6.0.u20-1.2.x86_64
alsa-plugins-1.0.23-31.1.x86_64
alsa-docs-1.0.23-67.1.noarch
alsa-plugins-pulse-1.0.23-31.1.x86_64
alsa-oss-32bit-1.0.17-53.1.x86_64
alsa-utils-1.0.23-23.1.x86_64

# rpm -qa '*pulse*'
libpulse-browse0-0.9.21-67.1.x86_64
pulseaudio-module-x11-0.9.21-67.1.x86_64
libpulse0-0.9.21-67.1.x86_64
libxine1-pulse-1.1.19-1.pm.44.3.x86_64
libao-pulse-0.9.3-181.2.x86_64
pulseaudio-module-lirc-0.9.21-67.1.x86_64
alsa-plugins-pulse-32bit-1.0.23-31.1.x86_64
pulseaudio-0.9.21-67.1.x86_64
pulseaudio-module-bluetooth-0.9.21-67.1.x86_64
pulseaudio-utils-0.9.21-67.1.x86_64
libpulse-mainloop-glib0-0.9.21-67.1.x86_64
alsa-plugins-pulse-1.0.23-31.1.x86_64
pulseaudio-lang-0.9.21-67.1.noarch
libpulse0-32bit-0.9.21-67.1.x86_64
pulseaudio-module-zeroconf-0.9.21-67.1.x86_64

# rpm -q libasound2
libasound2-1.0.23-67.1.x86_64

# uname -a
Linux x.y.z 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/modprobe.d/50-sound.conf

options snd slots=snd-hda-intel
# u1Nb.6gHZkwoFfB3:82801I (ICH9 Family) HD Audio Controller
alias snd-card-0 snd-hda-intel
Comment 1 Takashi Iwai 2010-09-08 12:56:35 UTC
OK, I found a few real bugs:
1. the parser tries to identify the real HP output and line output, but it detected wrongly due to a wrong memmove() call in snd_hda_parse_pin_def_config().
2. BIOS provides both as headphones, but one with a wrong sequence.  The headphone should have the sequence 0x0f.   This is a BIOS bug.
3. The multiple mic-pin assignment wasn't supported; this was already fixed recently.

So, the mic problem should have been fixed in the latest alsa-driver snapshot.  You'll have three mic inputs.  The headphone problem isn't solved yet, partly because it's a BIOS bug.  We need to add a quirk for this machine.
Comment 2 Takashi Iwai 2010-09-08 15:32:19 UTC
Could you try the latest alsa-driver-kmp again later?  The latest one should have a changelog entry like "* ALSA: hda - Add fixup for FSC Celsius H270".
If not, wait for a while until buildservice finishes the package building.
Comment 3 Peter Krútel 2010-09-09 06:40:50 UTC
So, I have updated and results are now following (everything tested only with default - empty - model option):

+ - expected change compared with previous status 
- - not expected change compared with previous status

Headphones:
1. Headphones in connection A mutes speakers (+), but are not working (-)
2. Headphones in connection B mutes speakers and are working (it was also before so)

Microphone:
Yes, I have 3 microphones:
Front Mic - external microphone connected directly to notebook (connection A)
Mic - external microphone connected to port replicator (connection B)
Front Mic 2 - notebook's internal built-in microphone

With previous situation there is no change. Front Mic and Front Mic 2 are working, Mic not. When Mic is selected as Input Source and I tested this microphone, it looks something is tried to be captured, you can hear "recording" noise (you can hear noise probably with recorded voice somewhere in the deep background and very slowly - only my personal feeling. "Recording" noise is dominant.)
Comment 4 Peter Krútel 2010-09-09 06:49:18 UTC
Another fact I have discovered, when testing microphone (I can confirm it for both Front Mics)

I have disabled these microphone channels + I have set recording level to zero, but they were working. I dont know, if it is bug or it works as expected.

Microphones were disbaled only when Capture channel was switched off or in Input Source control another microphone input was selected.
Comment 5 Takashi Iwai 2010-09-09 06:54:13 UTC
(In reply to comment #3)
> So, I have updated and results are now following (everything tested only with
> default - empty - model option):
> 
> + - expected change compared with previous status 
> - - not expected change compared with previous status
> 
> Headphones:
> 1. Headphones in connection A mutes speakers (+), but are not working (-)
> 2. Headphones in connection B mutes speakers and are working (it was also
> before so)

Could you take alsa-info.sh snapshot for each state, and upload to the bugzilla?

> Microphone:
> Yes, I have 3 microphones:
> Front Mic - external microphone connected directly to notebook (connection A)
> Mic - external microphone connected to port replicator (connection B)
> Front Mic 2 - notebook's internal built-in microphone
> 
> With previous situation there is no change. Front Mic and Front Mic 2 are
> working, Mic not. When Mic is selected as Input Source and I tested this
> microphone, it looks something is tried to be captured, you can hear
> "recording" noise (you can hear noise probably with recorded voice somewhere in
> the deep background and very slowly - only my personal feeling. "Recording"
> noise is dominant.)

Again, alsa-info.sh output is needed for further analysis.
Comment 6 Takashi Iwai 2010-09-09 06:55:35 UTC
(In reply to comment #4)
> Another fact I have discovered, when testing microphone (I can confirm it for
> both Front Mics)
> 
> I have disabled these microphone channels + I have set recording level to zero,
> but they were working. I dont know, if it is bug or it works as expected.
> 
> Microphones were disbaled only when Capture channel was switched off or in
> Input Source control another microphone input was selected.

This is the expected behavior (depending on the codec chip).
Comment 7 Peter Krútel 2010-09-09 07:37:47 UTC
Created attachment 388449 [details]
alsa-info_20100909.txt

I have tested with alsa KMP 20100908 after changes for Celsius were done, this output is produced with alsa KMP 20100909 (coming as update today). I hope, there are no differences between version patched yesterday and actual one (no new changes in changelog).
Comment 8 Takashi Iwai 2010-09-09 08:09:00 UTC
I need the alsa-info.sh output of *each* state, i.e. headphones unplugged, a headphone plugged but not working, plugged and working.  Ditto for mic jacks.
In that way, I can see the difference.
Comment 9 Peter Krútel 2010-09-09 09:10:32 UTC
Created attachment 388473 [details]
All unplugged, internal speakers and internal microphone working
Comment 10 Peter Krútel 2010-09-09 09:11:53 UTC
Created attachment 388475 [details]
Headphones in A, internal speakers muted, headphones does not work.
Comment 11 Peter Krútel 2010-09-09 09:13:30 UTC
Created attachment 388477 [details]
Headphones in B, internal speakers muted, headphones work.
Comment 12 Peter Krútel 2010-09-09 09:15:25 UTC
Created attachment 388478 [details]
Microphone in A works.
Comment 13 Peter Krútel 2010-09-09 09:17:18 UTC
Created attachment 388480 [details]
Microphone in B does not work, "recording" noise presented.
Comment 14 Peter Krútel 2010-09-09 09:18:54 UTC
Done. I hope all neccessary possibilities are attached.
Comment 15 Takashi Iwai 2010-09-16 16:51:00 UTC
Thanks, I understand now what got wrong.  I fixed the bugs now (hopefully), and the upcoming alsa-driver-kmp should work better.  Please give it a try later.
Comment 16 Peter Krútel 2010-09-17 07:05:39 UTC
Perfect! With alsa-driver-kmp-default 1.0.23.20100916_k2.6.34.0_12-28.1 everything works as expected - speakers are muted in both connection possibilities, all microphones are working too.

Good work, thanks. :-)
Comment 17 Peter Krútel 2010-09-17 07:08:36 UTC
Will be this bugfix added to openSUSE 11.3 Update repository or to next openSUSE release?
Comment 18 Takashi Iwai 2010-09-22 08:11:34 UTC
For the next kernel, yes, it should be.  All changes have been committed to the upstream kernel tree.  But for 11.3 kernel, I'm not going to backport the patches because they are fairly intrusive and too risky to apply without much QA works.

As a solution with KMP is provided, I'd like to close this now.
Comment 19 Peter Krútel 2010-09-22 13:41:12 UTC
OK.