Bug 91471

Summary: Pulseaudio enables Surround 4.0, while chmap reports no RL and RR
Product: PulseAudio Reporter: Arthur Borsboom <arthurborsboom>
Component: pavucontrolAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Arthur Borsboom 2015-07-27 07:14:32 UTC
In an effort to get an external subwoofer and a headset to work on my Asus N751JK laptop, I have started working with the Alsa devs.

After applying an Alsa patch to the Linux mainline kernel v4.2.0-rc3, an alsa developer believes one of the issues is a bug in Pulseaudio, see his statement at the end of this conversation: http://permalink.gmane.org/gmane.linux.alsa.devel/141974

Here is the whole conversation: http://comments.gmane.org/gmane.linux.alsa.devel/140852

Apparently on my laptop the Alsa-lib test tool 'chmap' shows the following channels:

Type = FIXED, Channels = 2
  FL FR
Type = FIXED, Channels = 4
  FL FR NA LFE

Pulseaudio (or pavucontrol) shows Stereo, Surround 2.1 and Surround 4.0. However, according to the alsa dev the Surround 4.0 option should not be there since there are no Rear Left and Rear Right speakers.

Alsa-info: http://www.alsa-project.org/db/?f=ab56d544c53402fc7fdb96956299753de2708a6f

Pulseaudio verbose log: http://pastebin.com/MwC3KQS5

How would you suggest to analyze and/or fix this issue?
Comment 1 Arthur Borsboom 2015-07-27 14:47:33 UTC
The analysis of Raymond Yau (alsa dev) based on my pulseaudio log. Maybe this helps to find the cause and solution.


(   6.509|   1.381) D: [pulseaudio] module-alsa-card.c: Jack 'Headphone Mic Jack' is now plugged in
(   6.509|   0.000) D: [pulseaudio] device-port.c: Setting port analog-output-headphones to status yes

This look like pulseaudio use headphone mic jack to set the headphone to available

(   6.509|   0.000) D: [pulseaudio] module-switch-on-port-available.c: Finding best profile
(   6.509|   0.000) D: [pulseaudio] module-switch-on-port-available.c: No suitable profile found
(   6.509|   0.000) D: [pulseaudio] device-port.c: Setting port analog-input-headphone-mic to status unknown

(   6.509|   0.000) D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
(   6.509|   0.000) D: [pulseaudio] device-port.c: Setting port analog-input-headset-mic to status unknown

But I don't understand why pulseaudio set status of headphone mic and headset mic to unknown

You did not use External Subwoofer Jack to change the status of external subwoofer, there is no traces of external subwoofer jack in your log
Comment 2 Raymond 2015-08-09 01:57:46 UTC
can you post the channel matrix in pulseaudio verbose log when you select surround40  profile and play

a) stereo
b) speaker test -c4 -t wav -Dpulse

since your chamnel map does not contain RL and RR , the channel matrix can not be an identity 4*4 martix
Comment 3 Arthur Borsboom 2015-08-09 06:55:05 UTC
Situation: alienware-patch applied to kernel 4.2.0-rc5, external subwoofer, headset or headphones are not plugged in.

Test a)

Stop and start pulseaudio with verbose logging
Verify that the Surround4.0 with Analog Input profile is selected in pavucontrol
Play music with Audacious
Stop music play

Result of grep matrix pulseverbose.log -C7:

(   4.258|   0.000) I: [pulseaudio] resampler.c: Forcing resampler 'copy', because of fixed, identical sample rates.
(   4.258|   0.000) D: [pulseaudio] resampler.c: Resampler:
(   4.258|   0.000) D: [pulseaudio] resampler.c:   rate 44100 -> 44100 (method copy)
(   4.258|   0.000) D: [pulseaudio] resampler.c:   format s16le -> s16le (intermediate s16le)
(   4.258|   0.000) D: [pulseaudio] resampler.c:   channels 2 -> 4 (resampling 2)
(   4.258|   0.000) D: [pulseaudio] resampler.c: Channel matrix:
(   4.258|   0.000) D: [pulseaudio] resampler.c:        I00   I01 
(   4.258|   0.000) D: [pulseaudio] resampler.c:     +------------
(   4.258|   0.000) D: [pulseaudio] resampler.c: O00 | 1.000 0.000
(   4.258|   0.000) D: [pulseaudio] resampler.c: O01 | 0.000 1.000
(   4.258|   0.000) D: [pulseaudio] resampler.c: O02 | 1.000 0.000
(   4.258|   0.000) D: [pulseaudio] resampler.c: O03 | 0.000 1.000

Test b)

Stop and start pulseaudio with verbose logging
Verify that the Surround4.0 with Analog Input profile is selected in pavucontrol
Play sound with speaker test -c4 -t wav -Dpulse
Wait for test to finish
Stop pulseaudio

Result of speaker-test

speaker-test 1.0.29

Playback device is pulse
Stream parameters are 48000Hz, S16_LE, 4 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 48 to 524288
Period size range from 16 to 174763
Using max buffer size 524288
Periods = 4
was set period_size = 131072
was set buffer_size = 524288
 0 - Front Left
 1 - Front Right
 3 - Rear Right
 2 - Rear Left
Time per period = 5.896920

Result of grep matrix pulseverbose.log -C7

<returns nothing>
Comment 4 GitLab Migration User 2018-07-30 09:28:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/issues/17.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.