[N56VZ, Realtek ALC663, Black Headphone Out, Right] No sound at all: Subwoofer not working

Bug #1040873 reported by sami
88
This bug affects 17 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hi,

this bug is a fork of https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/871808 because #871808 stands for a different hardware with a different solution, so people may get confused.

Here is a summary (see post #48 to #54 of #871808):
The subwoofer of Asus N56VZ laptop doesn't work "out of the box".

#sudo hda-jack-sense-test -a :
*** Without subwoofer:
Pin 0x1e (Black SPDIF Out): present = No
*** With subwoofer:
Pin 0x1e (Black SPDIF Out): present = Yes

http://www.alsa-project.org/db/?f=2778e7f430aa95ae219d0b2bc3cb5e46abd0a33a

--> There are two ways of making it work:

#1
a. Add to rc.local :
echo 0x1e 0x99130112 > /sys/class/sound/hwC0D0/user_pin_configs
echo 1 > /sys/class/sound/hwC0D0/reconfig
b. Add options snd-hda-intel model=asus-mode4 in /etc/modprobe.d/alsa-base.conf
c. Reboot
d. Set the mode to "Analog Stereo Output" and then to "Analog Surround 5.1 output" in the sound settings panel. You have to do this each time you reboot!!!

#2
a. Add to rc.local :
echo 0x16 0x99130111 > /sys/class/sound/hwC0D0/user_pin_configs
echo 0x1e 0x99130112 > /sys/class/sound/hwC0D0/user_pin_configs
echo 1 > /sys/class/sound/hwC0D0/reconfig
b. Reboot
c. Set the mode to "Analog Stereo Output" and then to "Analog Surround 5.1 output" in the sound settings panel. You have to do this each time you reboot!!!

Both give the same results and fix the bug.

--> Can you make it work out of the box?

There is still two other bugs on this laptop :
- crackling audio when playing with sound volume: see https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1040867
- When I put the omputer in sleep mode, there is no way to get sound working on resume: should I open a new bug to investigate this?

Regards
Sam

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: alsa-base 1.0.25+dfsg-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24
Uname: Linux 3.2.0-29-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: ALC663 Analog [ALC663 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
ApportVersion: 2.0.1-0ubuntu12
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: ALC663 Analog [ALC663 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: sam 1898 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xf7a10000 irq 47'
   Mixer name : 'Realtek ALC663'
   Components : 'HDA:10ec0663,10431477,00100002'
   Controls : 23
   Simple ctrls : 13
CheckboxSubmission: 54021779511d0213081a2b1707bf951c
CheckboxSystem: 4c773cd91921f9618cc2f1893bc1a87a
Date: Thu Aug 23 22:38:00 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: alsa-driver
Symptom: audio
Symptom_AlsaPlaybackTest: ALSA playback test through plughw:PCH failed
Symptom_Card: Built-in Audio - HDA Intel PCH
Symptom_DevicesInUse:
 1898 sam F.... pulseaudio
     PID ACCESS COMMAND
Symptom_Jack: Black Headphone Out, Right
Symptom_Type: No sound at all
Title: [N56VZ, Realtek ALC663, Black Headphone Out, Right] No sound at all
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/11/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: N56VZ.204
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: N56VZ
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrN56VZ.204:bd05/11/2012:svnASUSTeKCOMPUTERINC.:pnN56VZ:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnN56VZ:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
dmi.product.name: N56VZ
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.
modified.conffile..etc.modprobe.d.alsa.base.conf: [modified]
mtime.conffile..etc.modprobe.d.alsa.base.conf: 2012-08-23T22:27:03.314416

Revision history for this message
sami (miaousami) wrote :
description: updated
Revision history for this message
Raymond (superquad-vortex2) wrote :

how do you want to fix this problem ?

use jack sense of 0x16 to change the stereo profile to surround5.1 profile of pulseaudio

http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PNid=24&PFid=37&Level=5&Conn=4&ProdID=165

Supports primary SPDIF-OUT jack detection when CEN/LFE output is not enabled (customized RCA/optical transmitter with normal open switch is required)

Revision history for this message
sami (miaousami) wrote :

Hi Raymond,

--> can you be more specific when saying: "use jack sense of 0x16 to change the stereo profile to surround5.1 profile of pulseaudio"?
Also I read realtek's article but I am not sure to understand what SPDIF-OUT has to do with CEN/LFE...
As you can see I am not really keen on ALSA & pulse technical stuff... :-(

--> Anyway, after some days of testing, I noticed another (very) annoying thing:
I have to "Set the mode to "Analog Stereo Output" and then to "Analog Surround 5.1 output" in the sound settings panel" between each song I play to keep the CEN/LFE working.

To be more clear, let's say:
a. I start a song (e.g. using rhythmbox, but it is the same with vlc or banshee)
b. I do the trick "Analog Stereo output"->A="Analog Surround 5.1 output" to make the CEN/LFE works
c. I jump to another song
d. At this point the CEN/LFE stops work, and I have to do again the trick "Analog Stereo output"->A="Analog Surround 5.1 output" to make the CEN/LFE works.

I have no idea how to fix this problem as I am not developper.
But it will be my pleasure to help testing or debugging...

Sam

Revision history for this message
Raymond (superquad-vortex2) wrote :

node 0x1e is the spdif out pin complex, you loss the digital out device spdif (shared wth headphone jack) when you change the pin default of 0x1e

if you need the driver provide a jack detect kcontrol for ext subwoofer at 0x16 using the jack detect of ox1e,

you need to turn off misc=no_presence bit of 0x1e and rename the jack kctrl from spdif to ext subwoofer

 as the codec only has 3 stereo dac [audio output] for hp, speaker and ext subwoofer

plug hp mute speaker and ext subwoofer and disable spdif since it share the same jack.

/sys/class/sound/hwC0D0/init_pin_configs:
0x11 0x411111f0
0x12 0x411111f0
0x13 0x411111f0
0x14 0x90170110
0x15 0x411111f0
0x16 0x411111f0
0x17 0x411111f0
0x18 0x04a11830
0x19 0x90a7093f
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x4005822d
0x1e 0x04451120
0x21 0x0421101f

/sys/class/sound/hwC0D0/driver_pin_configs:
0x14 0x99130110
0x16 0x99130111
0x18 0x01a19840
0x19 0x99a3094f
0x21 0x0121441f

/sys/class/sound/hwC0D0/user_pin_configs:
0x1e 0x99130112

/sys/class/sound/hwC0D0/init_verbs:

Revision history for this message
sami (miaousami) wrote :

Hi Raymond,
your reply seems to be truncated...

Do you suggest I configure the PINs as you propose in post #4?
I thought driver_pin_configs and init_pin_configs were read only. Aren't they?

Anyway, PIN configuration is a bit unclear to me... I read the doc from alsa and tried to have a look at the source code, but it is quite complicated...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Revision history for this message
Thiago Martins (tcmartins) wrote :

Well, I have an ASUS N76V here with exactly the same subwoofer problem. The #2 fix proposed in the original post worked just fine under Precise. Unfortunately, since the upgrade to Quantal (12.10), it somehow breaks audio post-hibernate/sleep.

Revision history for this message
Thiago Martins (tcmartins) wrote :

I think I'm making some progress in a workaround for the sleep issue.

The issue (sound missing after wakeup) seems to manifest itself only when the machine is suspended *after* a user pin reconfigure. Since the reconfigure interface is still labeled as an "experimental feature", I wouldn't be surprised if there was a problem with it. We should probably create a bug report for that as well.

Apparently, just by reissuing the reconfigure commands again you can have a working sound. The problem is, of course, pulseaudio won't let you touch the reconfigure interface. So, the solution I found was to write an /etc/pm/sleep.d that temporarily kills pulseaudio, reload user pin configs (surprisingly, the values are already present in user_pin_configs, but must be rewritten) and then reloads pulseaudio.

A few issues:

- There's an audible loud "click" noise when the pins are reconfigured. It probably is a good idea to mute the audio before performing the reconfiguration, just like the old /usr/lib/pm-utils/sleep.d/01PulseAudio (in fact I already borrowed heavily from that script).

- There's a potential racing condition here. If pulseaudio ever reloads before the pin reconfiguration (autospawn makes this a possibility), the whole thing fails.

Anyway, here's my script. I hope it helps.

Revision history for this message
Thiago Martins (tcmartins) wrote :

Bad news: I just found out the "potential" race condition is very much real, I jus had a machine resumed with a failed reset on the pins. No big deal, if one runs the script manually (/etc/sleep.d/99_reconf_sndpins_pa resume) it succeeds.

BTW, I'm afraid the proposed user_pin_configs isn't perfect either. On the n76 (but I suspect the same applies to the n56) there's a SPDIF out, shared with the headphone jack. The proposed user_pin_configs don't create any SPDIF output.

Where can one find a documentation of these pin configuration values?

BTW, I think it's time to bug upstream about this.

Revision history for this message
sami (miaousami) wrote :

Hi Thiago,
it seems very hard to find documentation or informations...
As you said, we should ask for some helt upstream on <email address hidden>...

Revision history for this message
Raymond (superquad-vortex2) wrote :

you may try to clear misc bit of pin default of 0x1e so that the driver create a hda jack kcontrol

Define a customised alc663_unsol_event() to handle the unsolicited event fron the pin complex 0x1e

Misc = NO_PRESENCE

Node 0x1e [Pin Complex] wcaps 0x400780: Mono Digital
  Pincap 0x00000014: OUT Detect
  Pin Default 0x99430120: [Fixed] SPDIF Out at Int ATAPI
    Conn = ATAPI, Color = Unknown
    DefAssociation = 0x2, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x06

Revision history for this message
sami (miaousami) wrote :

Raymond,
can you be more specific on how I can do that ?

I guess I have to play with :

/sys/class/sound/hwC0D0/user_pin_configs:
0x1e 0xaaaaaaaa

but how do you calculate 0xaaaaaaaa ?

Revision history for this message
Raymond (superquad-vortex2) wrote :

In patch_realtek.c

At th end of alc_init_jack()

snd_hda_jack_add_kctl(codec, 0x1e, "asus subwoofer", 0);

Revision history for this message
David Henningsson (diwic) wrote :

Hi,

There were some patches going in upstream for enabling "Bass Speaker" recently. There are probably things we need to fix in PulseAudio too, but is running the latest upstream code ( https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS ) giving any improvement / change?

Revision history for this message
sami (miaousami) wrote :

Hi David,

I tested the latest alsa hda dkms module (alsa-hda-dkms_0.201211131352~precise1_all) on the current precise kernel (3.2.0-33-generic) but it didn't change anything.

- The bass speaker is not working without doing pin reconfiguration
- When doing pin reconfiguration as suggested in the initial bug report (solution #2), I'm getting exactly the same result as described in the bug report (and following posts).

Don't hesitate if you want me to further investigate.

By the way, I noticed that the headphone output is very weird (with or without the latest hda module) : the sound is a bit weird but hard to describe. If I put the balance on the left or on the right, it is not effective, but change the quality of the sound. NB : the headphone output is mutualized with the S/PDIF output...

Revision history for this message
Raymond (superquad-vortex2) wrote :

the alsa developer is unlikely to accept your patch which change the digital pin complex to analog internal speaker

Node 0x1e [Pin Complex] wcaps 0x400701: Stereo Digital

Revision history for this message
David Henningsson (diwic) wrote :

What jack do you actually plug your subwoofer into? Is it the SPDIF jack?

Revision history for this message
sami (miaousami) wrote :

Hi David,

the SPDIF jack is mutualized with the 3.5mm headphone jack.
The subwoofer jack is a dedicated one.

Sam

Revision history for this message
Jay7s (j-savery) wrote :
Download full text (3.9 KiB)

I use Ubuntu 12.04 on Asus N5 6VZ, the subwoofer used to work fine doing the following trick advised by Sami:

    a. Add to rc.local

    echo 0x1e 0x99130112 > /sys/class/sound/hwC0D0/user_pin_configs

    echo 1 > /sys/class/sound/hwC0D0/reconfig

    b. Add options snd-hda-intel model=asus-mode4 in /etc/modprobe.d/alsa-base.conf

    c. Reboot

    d. Set the mode to "Analog Surround 5.1 output" in the sound settings panel

But a few weeks ago, the "Analog Surround 5.1 output" box does not appear anymore on the sound setting panel and the subwoofer is not working. When plugged, I hear a small rumble from the subwoofer which is normal and indicates me that iti is connected. But when I play music, no sound is coming from it.

I tride to install this driver: https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS But no result.

I also tride the second trick.

Here is my /etc/rc.local:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
fstrim -v /
fstrim -v /home
echo 0x1e 0x99130112 > /sys/class/sound/hwC0D0/user_pin_configs
echo 1 > /sys/class/sound/hwC0D0/reconfig

exit 0

and my /etc/modprobe.d/alsa-base.conf:

# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7

# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }
#
# Workaround at bug #499695 (reverted in Ubuntu see LP #319505)
install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }
install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }
#
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }
# Cause optional modules to be loaded above sound card driver modules
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }
install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }

# Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)
install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --...

Read more...

Revision history for this message
Raymond (superquad-vortex2) wrote :

post the output of alsa-info.sh using model=auto

Revision history for this message
Jay7s (j-savery) wrote :

Thanks Raymond, so i followed your instructions:
1 I changed my "/etc/modprobe.d/alsa-base.conf" las line into :
   options snd-hda-intel model=auto

2 I rebooted and plugged the subwoofer

3 I launched the alsa-info.sh script, and the result is at this adress:

http://www.alsa-project.org/db/?f=f44dd0723919e74edaa79d94d5deae69a6178f61

Thanks 4 your time

Revision history for this message
sami (miaousami) wrote :

same as Jerome for me...
I'm not using the subwoofer anymore, so i don't know since when it happens...

There is no more the box in the sound settings panel that allows to change set the mode to "Analog Surround 5.1 output"...

Revision history for this message
sami (miaousami) wrote :

well, I think it comes from here in dmesg at boot:
[ 19.775668] hda-codec: reconfiguring
[ 19.775670] The codec is being used, can't reconfigure.

the reconfigure doesn't work...
Any idea...?

Revision history for this message
Raymond (superquad-vortex2) wrote :

did you see the red light in the headphone spdif combo Jack when IEC958 switch is on ?

Node 0x1e is the digital pin complex which connect to digital output

retask it to speaker won`t work since it is not connected to analog audio output,

try retasking those output pins [N/A] to speaker one by one

Node 0x1e [Pin Complex] wcaps 0x400701: Stereo Digital
  Pincap 0x00000010: OUT
  Pin Default 0x04451120: [Jack] SPDIF Out at Ext Right
    Conn = Optical, Color = Black
    DefAssociation = 0x2, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Power states: D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x06

Revision history for this message
Raymond (superquad-vortex2) wrote :

#sudo hda-jack-sense-test -a :
 *** Without subwoofer:
 Pin 0x1e (Black SPDIF Out): present = No
 *** With subwoofer:
 Pin 0x1e (Black SPDIF Out): present = Yes

Pincap 0x00000010: OUT

the point is the pincap of node 0x1e does not support pin detect, the driver won't create Jack detect control

Revision history for this message
David Henningsson (diwic) wrote :

> [ 19.775668] hda-codec: reconfiguring
> [ 19.775670] The codec is being used, can't reconfigure.

> the reconfigure doesn't work...
> Any idea...?

Three ideas:
 1) There was a PulseAudio update approximately a few weeks ago; try reverting from 1:1.1-0ubuntu15.2 to 1:1.1-0ubuntu15.1
 2) There are regular kernel updates, try reverting to an older kernel
 3) You installed some other software that hogs the sound card. Try executing "fuser -v" from your rc.local and pipe the output to some file you can examine to see which application is using the sound card.

Revision history for this message
sami (miaousami) wrote :

Hi,

I downgraded pulseaudio : sudo apt-get install pulseaudio=1:1.1-0ubuntu15
It's working again.
So it has to do with the las upgrade of pulse audio (1:1.1-0ubuntu15.2)...

Anyway, I also noticed that there are changes in Pin names (i don't know when it changed, but it differs from my initial post) :
- The subwoofer PIN is now called "internal speaker"
Pin 0x1e (Internal Speaker): present = Yes
- The S/PDIF output, which is mutualized with earphone output is now called "black hp out"
Pin 0x21 (Black HP Out): present = No

@Raymond : there is no led near the subwoofer jack or near the spdif/earphone jack.

Revision history for this message
sami (miaousami) wrote :

forget about changes in pin names : this is due to the PIN reconfiguration...

Revision history for this message
Raymond (superquad-vortex2) wrote :

http://www.alsa-project.org/db/?f=2778e7f430aa95ae219d0b2bc3cb5e46abd0a33a

--> There are two ways of making it work:

#1
 a. Add to rc.local :
 echo 0x1e 0x99130112 > /sys/class/sound/hwC0D0/user_pin_configs
 echo 1 > /sys/class/sound/hwC0D0/reconfig
 b. Add options snd-hda-intel model=asus-mode4 in /etc/modprobe.d/alsa-base.conf
 c. Reboot
 d. Set the mode to "Analog Stereo Output" and then to "Analog Surround 5.1 output" in the sound settings panel. You have to do this each time you reboot!!!

you lost the digital output when you echo 0x1e 0x99130112 > /sys/class/sound/hwC0D0/user_pin_configs

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC663 Analog [ALC663 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

http://www.alsa-project.org/db/?f=f44dd0723919e74edaa79d94d5deae69a6178f61

Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]

do you mean the red light inside the optical spdif is off ?

Revision history for this message
Raymond (superquad-vortex2) wrote :

Did the lfe or center volume and switch affect the subwoofer since only node 0x16 can connected to node 0x04

Node 0x04 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Center Playback Volume", index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Control: name="LFE Playback Volume", index=0, device=0
    ControlAmp: chs=2, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals: [0x34 0x2f]
  Converter: stream=8, channel=4
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0

Node 0x16 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Center Playback Switch", index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Control: name="LFE Playback Switch", index=0, device=0
    ControlAmp: chs=2, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x00 0x00]
  Pincap 0x00000034: IN OUT Detect
  Pin Default 0x99130111: [Fixed] Speaker at Int ATAPI
    Conn = ATAPI, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x1
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x0e

Revision history for this message
sami (miaousami) wrote :

Hi Raymond,

I am not an expert, but even under Windows there is no light within the spdif output jack.

The spdif output jack is mutualized with the 3.5 earphone jack.
So I think the spdif output is a copper one, not optical... (I don't know how to check this)

Revision history for this message
sami (miaousami) wrote :

In Analog Surround 5.1 output with the previous version of pulse that allows the subwoofer to work :
- LFE is affecting only the subwoofer volume
- Center has no effect
- Front affects both left and right speakers, but not the subwoofer except if you balance left or right
--> This seems to me a normal behaviour

In Analog stereo mode,
- LFE is affecting only the subwoofer volume
- Center has no effect
- Front affects both left and right speakers, but : if you balance left, there is no more subwoofer output, and if you balance right there is full output on subwoofer
- The subwoofer seems to work "as if" connected to a right output, without any lowpass filter
--> This is a completely wrong behaviour

Revision history for this message
Raymond (superquad-vortex2) wrote :

does the enter playback volume has and effect on the suboofer ?

there are only three DAC with volume control , the headphone will have to share the volume control in 5.1

the reason why you change the spdif out to speaker is just a hack to trick the driver to config 5.1 with the headphone playback volume control

do you mean model=auto

echo 0x16 0x99130111 > /sys/class/sound/hwC0D0/user_pin_configs

and dynamic reconfig is not enough for the driver to create the bass speaker playback volume using the new generic auto conf ?

Node 0x16 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Center Playback Switch", index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Control: name="LFE Playback Switch", index=0, device=0
    ControlAmp: chs=2, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x00 0x00]
  Pincap 0x00000034: IN OUT Detect
  Pin Default 0x99130111: [Fixed] Speaker at Int ATAPI
    Conn = ATAPI, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x1
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1

Revision history for this message
Raymond (superquad-vortex2) wrote :

/sys/class/sound/hwC0D0/init_pin_configs:
0x1e 0x04451120

the BIOS default is optical instead of RCA

Pin Default 0x04451120: [Jack] SPDIF Out at Ext Right
    Conn = Optical, Color = Black
    DefAssociation = 0x2, Sequence = 0x0
    Misc = NO_PRESENCE

Revision history for this message
Raymond (superquad-vortex2) wrote :

> this bug is a fork of https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/871808 because #871808 stands for a different hardware with a different solution, so people may get confused.

 the pincap of node 0x1e revision 0x100001 - Pincap 0x00000014: OUT Detect

but revision 0x100002 - Pincap 0x00000010: OUT

Codec: Realtek ALC663
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0663
Subsystem Id: 0x10431b73
Revision Id: 0x100001

Node 0x1e [Pin Complex] wcaps 0x400780: Mono Digital
  Pincap 0x00000014: OUT Detect
  Pin Default 0x99430120: [Fixed] SPDIF Out at Int ATAPI
    Conn = ATAPI, Color = Unknown
    DefAssociation = 0x2, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x06

Codec: Realtek ALC663
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0663
Subsystem Id: 0x10431477
Revision Id: 0x100002

Node 0x1e [Pin Complex] wcaps 0x400701: Stereo Digital
  Pincap 0x00000010: OUT
  Pin Default 0x04451120: [Jack] SPDIF Out at Ext Right
    Conn = Optical, Color = Black
    DefAssociation = 0x2, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Power states: D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x06

Revision history for this message
miccs (meomic) wrote :

hello, i have asus n76vz (its the same as n56vz but it have 17 inch screen) and i can report that the best i can get is exactly same behavior as "sami" mentioned in post #32

if you need any logs from me or something just write - i'll try to provide

Revision history for this message
WhiteWind (temkaveter) wrote :

Whoo... Nothing understandable for me ))) I have asus n56vz, all I have done leads me to the subwoofer playing rear right only. No lo-pass filters - so it`s not usable...
I am not so good in English and all that pins to understand - is there any working solution or not?
I have asus-mode4 fix and pins reconfigured like so:
echo 0x16 0x99130111 > /sys/class/sound/hwC0D0/user_pin_configs
echo 0x1e 0x99130112 > /sys/class/sound/hwC0D0/user_pin_configs

Am I wrong somewhere or it`s the best we can achieve now?

Revision history for this message
miccs (meomic) wrote :

i think it is best that can be achieved now, ive saw few people saying that it is working good on their notebook(various asus notebooks like n46vz etc), but when i asked them via pm if it is really working like it should - i mean symptoms like sami mentioned in post #32, etc. they said it is exactly same - not working like it should (dont know why they wrote that it was) - and these comments can be found here on launchpad - there are few bug reports about asus and sub-woofers (few different models of notebooks)...
like these:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/728161
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/871808

i hope the solution can be found(one day), it is a year already that i have subwoofer(shipped with notebook) that cant be used....(on linux)

Revision history for this message
Raymond (superquad-vortex2) wrote :

not sure why the subwoofer use TRRS Jack

does it use spdif since 3 pins

http://www.intel.com/support/motherboards/desktop/sb/CS-032871.htm

there is also a mono pin

Node 0x17 [Pin Complex] wcaps 0x40050c: Mono Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x80]
  Pincap 0x00000010: OUT
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x0f

if subwoofer is only connected to right channel of node 0x16, the solution is force the driver in 4 channel mode and need pulseaudio to mix left and right to subwoofer

you can also restrict the auto parser to put the two speaker pins into extra out

but those notebook with three internal speakers to line out to support 5.1

for (i = 0; i < ARRAY_SIZE(mout->extra_out_nid); i++)
  if (!mout->no_share_stream && mout->extra_out_nid[i])
   snd_hda_codec_setup_stream(codec,
         mout->extra_out_nid[i],
         stream_tag, 0, format);

the retask of spdif to speaker won`t help since you lose the center and rear channels in 5.1 mode

 it is just use a bug in the auto parser and those alc880 codec with zero pin default at the digital pin complex

Revision history for this message
Raymond (superquad-vortex2) wrote :

the deskstop users are suffered from the side effect of copy front since stereo is copied to all speakers

can alsa only enabled this feature for notebook ?

/* surrounds */
 for (i = 1; i < mout->num_dacs; i++) {
  if (chs >= (i + 1) * 2) /* independent out */
   snd_hda_codec_setup_stream(codec, nids[i], stream_tag,
         i * 2, format);
  else if (!mout->no_share_stream) /* copy front */
   snd_hda_codec_setup_stream(codec, nids[i], stream_tag,
         0, format);
 }

Revision history for this message
krustymars (flo-wernert) wrote :

hi folks, I own too a N56VZ and I am affected by the lack of support for subwoofer under linux

I've been able to make it work with the workaround #2

echo 0x16 0x99130111 > /sys/class/sound/hwC0D0/user_pin_configs
echo 0x1e 0x99130112 > /sys/class/sound/hwC0D0/user_pin_configs
echo 1 > /sys/class/sound/hwC0D0/reconfig

change the config in pulseaudio panel everytime I plug/unplug the subwoofer

Just a little improvement to this, instead of changing the config in the panel you can use the following command to change the current selected config twice. This example applies if your target configuration is 4.1 surround + input

    pactl set-card-profile 0 output:analog-surround-51
    pactl set-card-profile 0 output:analog-surround-41+input:analog-stereo

It will do the same thing that you use to do manually in the panel but from command line

In the case you have another target configuration that you don't know the name, use pacmd tool
   pacmd
and in the console type
   list-cards

It will give you the name of your card (card0 in the example) and the supported modes names (output:analog-surround-41+input:analog-stereo in the example). Just pick the name of your card and config to replace it in the pactl command.

To get it working more seamlessly, you can put these commands in a bash script and affect it to a shortcut that you can do when you plug/unplug the woofer

To get it working even more seamlessly, I'm working on creating a daemon that will detect when the woofer is plugged, it currently works for some players (e.g : spotify), but not for all of them (e.g. : VLC), I don't really know why (maybe some players have some application specific audio output configuration instead of getting the standard output from the user pulseaudio config)

It relies on hda-jack-sense-test in ppa:diwic/misc snd-hda-tools, I wrote it quick and dirty so feel free to improve it if you think it can be

You can find the script attached, if you play a bit with it and find a way to make work for every player let me know

Revision history for this message
Raymond (superquad-vortex2) wrote :

can you post the pulseaudio verbose log for surround41 ?

 pactl set-card-profile 0 output:analog-surround-41+input:analog-stereo

since pulseaudio server disable channels conversion and HDA does not support 1, 3 , 5 or 7 channels

Revision history for this message
ScottMarlowe (scott-marlowe) wrote :

Just and FYI that this bug also affects the N56DP (AMD version of the N56) and the #1 fix in the first post does fix the problem for me as long as I use surround 4.1 as 5.1 does not work.

Revision history for this message
ScottMarlowe (scott-marlowe) wrote :

Correction to my previous post. I HAVE to switch from 4.1 to 5.1 or 5.1 to 4.1 on reboot to make the change take effect. Either 5.1 or 4.1 work after that.

Revision history for this message
Raymond (superquad-vortex2) wrote :

echo 1 > /sys/class/sound/hwC0D0/reconfig

the side effect of dynamic reconfigure is the driver remove the controls (1 to 24) except those user space softvol controls (25 to 26), create the new controls from 27

Alsactl output
!!--------------

--startcollapse--
state.PCH {
 control.25 {
  iface MIXER
  name 'PCM Playback Volume'
  value.0 255
  value.1 255
  comment {
   access 'read write user'
   type INTEGER
   count 2
   range '0 - 255'
   tlv '0000000100000008ffffec1400000014'
   dbmin -5100
   dbmax 0
   dbvalue.0 0
   dbvalue.1 0
  }
 }
 control.26 {
  iface MIXER
  name 'Digital Capture Volume'
  value.0 60
  value.1 60
  comment {
   access 'read write user'
   type INTEGER
   count 2
   range '0 - 120'
   tlv '0000000100000008fffff44800000032'
   dbmin -3000
   dbmax 3000
   dbvalue.0 0
   dbvalue.1 0
  }
 }
 control.27 {
  iface MIXER
  name 'Front Playback Volume'
  value.0 64
  value.1 64
  comment {
   access 'read write'
   type INTEGER
   count 2
   range '0 - 64'
   dbmin -6400
   dbmax 0
   dbvalue.0 0
   dbvalue.1 0
  }

Revision history for this message
miccs (meomic) wrote :

so what is missing?
can someone with such knowledge write summary like alsa is missing this and this or pulse is missing this or this
also if its possible to code it without nasty hacks that wont be merged into mainline - i can code but i dont know alsa nor pulseaudio code structure - too much to read - but provided few tips i prolly could make it w/o wasting weeks of time(reading whole code) just to know how its written... (for sure its pretty big)

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
miccs (meomic) wrote :

correct me if im wrong but that commit will just automatically set 'asus-mode4' - nothing more
and that for sure does not make the woffer play what it should - it plays all the tones right now - not just the 'basses'.
playing with pulseaudio config helps nothing - it is playing what it is liking.
not even talking about switching profiles to audio stereo duplex then to 5.1 then to 4.1 everytime song change - without it the woffer plays nothing

Revision history for this message
miccs (meomic) wrote :

for now best i have acheived is:
- pins configured as #2 solution says (first post in this bug report)
- in /etc/pulse/daemon.conf you need to enable this option:
 enable-lfe-remixing = yes

 with this option you wont have to change profiles each time song changes to get woofer working
- use a 'daemon' from this bug report (post #41) or my little changed ver (it shows 'ubuntus' notifications when plugged etc)

this setup 'tries' to play correctly when you provide 5.1 input - try with some movie - credits have some music
the woofer tries to play only basses - the problem is that they are not clean and loud - havent figured out why yet.
when you provide stereo input it plays left/right channel (all the tonnes)
theoretically this option: enable-remixing = yes in /etc/pulse/daemon.conf should fix it (it should do 'low-pass' filter and the woofer should get only basses)
but it doesnt work - setting custom channel-map / default-sample-channels helps nothing
setting in /etc/pulse/default.pa
load-module module-alsa-sink device=hw:0 channels=6 channel_map=here many different channel mappings(same num as channels num)
also helps nothing

normally when set 5.1 profile - the woffer loudness is affected also by front-left/right volume (the volume sliders in pavucontrol)
but when you add to the /etc/pulse/default.pa this line:
load-module module-combine channels=3 channel_map=front-left,front-right,lfe
you will see in pavucontrol another set of sliders left right woffer
put these 5.1 sliders to the eg. 50 / 100%
play some music (can be stereo) doesnt matter, in pavucontrol (playback tab) set your music app so it will play to the 'simultaneous output to built-in audio analog surround 5.1'
go to output devices tab and now front-left / right doesnt change the volume of the woffer - can mute both and the woffer will just play (you need to use these new added set of sliders (these 3)) - not the default 5.1 sliders
prolly its not 'ready' / nice to use but its good for testing - you can hear what your woffer really is playing etc.
if someone wants this option - you can add it to the 'daemon' script - so it will load / unload that module when you plug/unplug the speaker (using pacmd or smth.)
also be sure to restart pulse every time you change its config files: pulseaudio --kill should do the job (it should autospawn after few secs) if not just use pulseaudio --start (do these as nonroot user)

whats left is to force pulseaudio to 'create the basses' on the fly (lowpass filter) - maybe then it wont play left/right channel
if someone has any idea how to improve it - feel free i can test

Revision history for this message
Raymond (superquad-vortex2) wrote :

I have doubt about hacking the digital out pin complex 0x1e to a [Fixed] Speaker at Int ATAPI
since you are using a bug of the auto_parser since hda_generic.c already check the output pin and analog dac are reachable but this digital pin can only connected to Digital Audio Output

/hda-decode-pincfg 0x99130112
Pin Default 0x99130112: [Fixed] Speaker at Int ATAPI
  Conn = ATAPI, Color = Unknown
  DefAssociation = 0x1, Sequence = 0x2, Misc = 0x1

can you post the system log using driver configured with debug=verbose ?

Revision history for this message
Raymond (superquad-vortex2) wrote :

do you mean node 0x16 is the subwoofer ?

have you try changing this node to line out with Misc = NO_PRESENCE ?

both node 0x14 and node 0x16 have the front channels and

 line out won't mute speaker

headphone can still automute speaker and line out

[ALC662_FIXUP_ASUS_MODE4] = {
  .type = HDA_FIXUP_PINS,
  .v.pins = (const struct hda_pintbl[]) {
   { 0x14, 0x99130110 }, /* speaker */
   { 0x16, 0x99130111 }, /* speaker */
   { 0x18, 0x01a19840 }, /* mic */
   { 0x19, 0x99a3094f }, /* int-mic */
   { 0x21, 0x0121441f }, /* HP */
   { }
  },
  .chained = true,
  .chain_id = ALC662_FIXUP_SKU_IGNORE
 },

Revision history for this message
miccs (meomic) wrote :

it seems like node[0x16] is the subwoofer - ive unchecked 'out' checkbox and it stopped playing - checked again and it is playing
when i uncheck out checkbox in 0x14 the front left/right are not playing - subwoffer is playing (0x16 out is checked)
is that the info that you wanted? because i didnt understood what you meant by 'change this node to line out with Misc = NO_PRESENCE

so 0x1e is only checked for (plugged / unplugged?) - thats why trrs connector?

also can tell how to set driver into debug=verbose ?

it is /etc/modprobe.d/alsa-base.conf
and here
options snd-hda-intel debug=verbose ? or?

Revision history for this message
miccs (meomic) wrote :

also unchecking / checking the out checkbox in node[0x1e] dont have any impact on the music - front left/right and woofer are still playing

ps. sorry for not making it in 1 post... --totally forgot to mention this

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://launchpad.net/~diwic/+archive/hda

use hda-jack-retask to change node 0x16 to [Jack] Line Out at any location different from the headphone and headphone , Misc = NO_PRESENCE (no Jack detection so that driver won't mute speaker when the external subwoofer is plugged)

post the output of alsa-info.sh

Revision history for this message
Raymond (superquad-vortex2) wrote :

> it seems like node[0x16] is the subwoofer - ive unchecked 'out' checkbox and it stopped playing - checked again and it is playing

does both left/right mute in node 0x16 have effect ?

  Amp-Out vals: [0x00 0x00]

  Amp-Out vals: [0x80 0x00]

  Amp-Out vals: [0x00 0x80]

  Amp-Out vals: [0x80 0x80]

ode 0x16 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Center Playback Switch", index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Control: name="LFE Playback Switch", index=0, device=0
    ControlAmp: chs=2, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x00 0x00]
  Pincap 0x00000034: IN OUT Detect
  Pin Default 0x99130111: [Fixed] Speaker at Int ATAPI
    Conn = ATAPI, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x1
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x0e

Revision history for this message
Raymond (superquad-vortex2) wrote :

> c. Set the mode to "Analog Stereo Output" and then to "Analog Surround 5.1 output" in the sound settings panel.

it is unlikely that you can switch to 6-channels for hda_generic.c

it is not easy for your hack to steal the "Surround Playback Volume" and use it as headphone playback volume

Revision history for this message
Raymond (superquad-vortex2) wrote :

D: [pulseaudio] resampler.c: Channel matrix:
D: [pulseaudio] resampler.c: I00 I01
D: [pulseaudio] resampler.c: +------------
D: [pulseaudio] resampler.c: O00 | 1.000 0.000
D: [pulseaudio] resampler.c: O01 | 0.000 1.000
D: [pulseaudio] resampler.c: O02 | 1.000 0.000
D: [pulseaudio] resampler.c: O03 | 0.000 1.000
D: [pulseaudio] resampler.c: O04 | 0.500 0.500
D: [pulseaudio] resampler.c: O05 | 0.000 0.000

do you mean enabling-lfe-mixing change O05 from 0.00 0.00 to 0.50 0.50 ?

Revision history for this message
Raymond (superquad-vortex2) wrote :

seem speaker is better than line out if you cannot connect any other speaker to use this jack

Left Side
Subwoofer Jack (on selected models)
The proprietary subwoofer jack is used to connect the
subwoofer that comes with your Notebook PC ONLY.
The subwoofer allows you to enjoy amazing bass (low
frequency) sounds in your multimedia applications.

DO NOT connect other device to this jack. Doing so may damage
the subwoofer jack or the Notebook PC

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
miccs (meomic) wrote :

> does both left/right mute in node 0x16 have effect ?

only Val[1] mute affects woofer, Val[0] doesnt seem to have any impact on woofer nor internal speakers

> post rhw output of
> chmap -Dhw:0 query

LD_PRELOAD="/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_conf_pulse.so" ./chmap -Dhw:0 query

----after fresh reboot - before pin reconf------
Type = FIXED, Channels = 2
  FL FR
------------------------------------------------
--------after pin reconf(#2 solution)-----------
Type = FIXED, Channels = 2
  FL FR
Type = FIXED, Channels = 4
  FL FR RL RR
Type = FIXED, Channels = 6
  FL FR RL RR FC LFE
------------------------------------------------

> do you mean enabling-lfe-mixing change O05 from 0.00 0.00 to 0.50 0.50 ?
yes it appears so - it looks like that:

enable-lfe-remixing = no -- 5.1 input can be heard from the woofer but stereo not ( i need to chg profiles after each song - so it will mix like with lfe-remixing)

enable-lfe-remixing = yes -- (5.1 input and stereo) can be heard from the woofer

with 5.1 input only pseudo basses can be heard but when lfe-remixing=yes and stereo applied it looks like it mix left and right to the woofer - not sure about precentage but ive created some audio
left channel pink noise and right channel other tonnes - both can be heard from the woofer

> post the output of alsa-info.sh

see attachment file

> use hda-jack-retask to change node 0x16 to [Jack] Line Out at any location different from the headphone > and headphone , Misc = NO_PRESENCE (no Jack detection so that driver won't mute speaker when the
> external subwoofer is plugged)

i still dont seem to understand that - or i missed the point - ive changed like you said ( i think so)
but i dont hear any difference - (am i supposed to?) - ive did it after pin reconfig - should i do it after fresh restart (w/o pin reconf - as #2 says?)

Revision history for this message
Raymond (superquad-vortex2) wrote :

do you mean the chaanel map when using asus-mode4 should be

Type = FIXED, Channels = 4
   FL FR NA LFE

Revision history for this message
miccs (meomic) wrote :

if i understand this whole thing correctly then yes...

best if i could do live testing - i mean this can be done via dkms alsa? or i would need to compile whole kernel?
guide me a little bit where i should start to change code and i will do it

Revision history for this message
Raymond (superquad-vortex2) wrote :

http://git.alsa-project.org/?p=alsa-utils.git;a=commit;h=951cb2c2974293db6e12ef067ae7001074887932

speaker test also allow you to specify chmap "FL,FR,FC,LFE"

it seem pulseaudio still not support chmap

you better send email to Tiwai and the reporter of https://bugzilla.novell.com/show_bug.cgi?id=841645

how to change the 4 channel chmap when presence detect of node 0x1e if this can indicate the presence of the subwoofer

Revision history for this message
madbiologist (me-again) wrote :

Ok, I'll admit to not having read all 63 comments in this bug report, but the non-working subwoofer on the Asus N56VZ seems to have been fixed upstream in kernel 3.12-rc5 and cc'd to the stable kernel series.

author Takashi Iwai 2013-10-08
committer Takashi Iwai 2013-10-08
commit c6cc3d58b4042f5cadae653ff8d3df26af1a0169
tree 8f5dd513669164db9ad43bb13d40640054557324
parent 39edac70e9aedf451fccaa851b273ace9fcca0bd

ALSA: hda - Add fixup for ASUS N56VZ

ASUS N56VZ needs a fixup for the bass speaker pin, which was already
provided via model=asus-mode4.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=841645
Cc: stable
Signed-off-by: Takashi Iwai

Revision history for this message
miccs (meomic) wrote :

read comments #47 #48 #49 and you will know why it fix nothing

Revision history for this message
Raymond (superquad-vortex2) wrote :

it is strange that subwoofer use TRRS jack and only need right channel

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=53c334add1e57bf96aec9b1fd927ff7746a7cb79

The solution #2

I don't understand why your hack select 0x1e since it is optical output

alc662 support two spdif out

0x11

autoconfig: line_outs=3 (0x14/0x16/0x11/0x0/0x0) type:speaker
   speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
   hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
   mono: mono_out=0x0
   dig-out=0x1e/0x0
   inputs:
     Mic=0x18
     Internal Mic=0x19

==> Best config: lo_type=1, wired=1, mio=1
multi_outs = 14/16/11/0 : 2/4/10/0 (type SP)
  out path: depth=3 :02:0c:14
  out path: depth=3 :04:0e:16
  out path: depth=2 :10:11 <------- seem a bug since it allow digital DAC (Your trick won't work if this bug is fixed)
hp_outs = 21/0/0/0 : 3/0/0/0
  hp path: depth=3 :03:0d:21

digout path: depth=2 :06:1e

CTRL: add: Front Playback Volume:0
CTRL: add: Front Playback Switch:0
CTRL: add: Surround Playback Volume:0
CTRL: add: Surround Playback Switch:0
CTRL: add: Headphone Playback Volume:0
CTRL: add: Headphone Playback Switch:0

> PCM 0 p 48000 6 16
Open PCM ALC663 Analog for play
Available PCM parameters:
  channels: 2/6
  formats: S16_LE S32_LE
  rates: 44100 48000 96000 192000
Prepare PCM, rate=48000, channels=6, format=16 bits
PCM format_val = 0x15
hda_codec_cleanup_stream: NID=0x6
hda_codec_setup_stream: NID=0x2, stream=0x1, channel=0, format=0x15
send: NID=0x2, VERB=0xf06(get_channel_streamid), PARM=0x0
receive: 0x0
send: NID=0x2, VERB=0x706(set_channel_streamid), PARM=0x10
send: NID=0x2, VERB=0xa00(get_stream_format), PARM=0x0
receive: 0x0
send: NID=0x2, VERB=0x200(set_stream_format), PARM=0x15
hda_codec_setup_stream: NID=0x3, stream=0x1, channel=0, format=0x15
send: NID=0x3, VERB=0xf06(get_channel_streamid), PARM=0x0
receive: 0x0
send: NID=0x3, VERB=0x706(set_channel_streamid), PARM=0x10
send: NID=0x3, VERB=0xa00(get_stream_format), PARM=0x0
receive: 0x0
send: NID=0x3, VERB=0x200(set_stream_format), PARM=0x15
hda_codec_setup_stream: NID=0x4, stream=0x1, channel=2, format=0x15
send: NID=0x4, VERB=0xf06(get_channel_streamid), PARM=0x0
receive: 0x0
send: NID=0x4, VERB=0x706(set_channel_streamid), PARM=0x12
send: NID=0x4, VERB=0xa00(get_stream_format), PARM=0x0
receive: 0x0
send: NID=0x4, VERB=0x200(set_stream_format), PARM=0x15
hda_codec_setup_stream: NID=0x10, stream=0x1, channel=4, format=0x15
send: NID=0x10, VERB=0xf06(get_channel_streamid), PARM=0x0
receive: 0x0
send: NID=0x10, VERB=0x706(set_channel_streamid), PARM=0x14
send: NID=0x10, VERB=0xa00(get_stream_format), PARM=0x0
receive: 0x0
send: NID=0x10, VERB=0x200(set_stream_format), PARM=0x15
PCM Clean up
hda_codec_cleanup_stream: NID=0x2
hda_codec_cleanup_stream: NID=0x4
hda_codec_cleanup_stream: NID=0x10
hda_codec_cleanup_stream: NID=0x3
Close PCM

Revision history for this message
sami (miaousami) wrote :

Raymond,
I think you're making a mistake in #66:
"I don't understand why your hack select 0x1e since it is optical output"

Remember from the initial bug report:
"#sudo hda-jack-sense-test -a :
*** Without subwoofer:
Pin 0x1e (Black SPDIF Out): present = No
*** With subwoofer:
Pin 0x1e (Black SPDIF Out): present = Yes"

The physical subwoofer port is a copper one
So either the physical subwoofer port does not match 0x1e (initial bug report would be wrong), or alsa report it to be optical while it is not...

How could we check that?

Sam

Revision history for this message
Raymond (superquad-vortex2) wrote :

you should able to see the red light in optical spdif jack if you turn on IEC958 Playback Switch

Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]

refer to codec info of N55SF in https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/871808

misc bit (bit 8) of the pin default of 0x1e is set to indicate no jack detection ( driver don't enable unsol event the jack detection)

  Pin Default 0x99430120: [Fixed] SPDIF Out at Int ATAPI
    Conn = ATAPI, Color = Unknown

this pin default is really represent the intel desktop S/PDIF header

http://www.intel.com/support/motherboards/desktop/sb/CS-032871.htm

S/PDIF header pin-outs
Intel® Desktop Boards use either a 4-pin or 3-pin S/PDIF header

but those ASUS with sonic master seem support optical out with a combo headphone jack

but neither node 0x06 nor node 0x10 have Amp-Out

Node 0x06 [Audio Output] wcaps 0x611: Stereo Digital
Node 0x10 [Audio Output] wcaps 0x611: Stereo Digital

so there won't be any volume control even the subwoofer is using digital output

Node 0x1e [Pin Complex] wcaps 0x400780: Mono Digital
  Pincap 0x00000014: OUT Detect
  Pin Default 0x99430120: [Fixed] SPDIF Out at Int ATAPI
    Conn = ATAPI, Color = Unknown
    DefAssociation = 0x2, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x06

Revision history for this message
miccs (meomic) wrote :

-----quoting Takashi Iwai response from here: https://bugzilla.novell.com/show_bug.cgi?id=841645 -------

asus-mode4 reconfigures the pin 0x16, not 0x1e, so mode4 itself is the right
setup.

What's missing is the information of the right-only channel, and yes, this
should be informed via chmap API. But in this case, better to open another bug
to track this issue, because it's basically an enhancement. As you already
mentioned, PA doesn't honor the chmap information even if the driver provides,
thus we'll need more implementations in PA side, too.

So, just create a new bug report with the short introduction you put here.
Then I'll work on the driver side patch later, and the rest is more job in PA
side.

------end of quote

2 bug reports has been created - if someone wants to track :
https://bugzilla.novell.com/show_bug.cgi?id=846529
https://bugzilla.novell.com/show_bug.cgi?id=846531

so the thing that is unknown is the pulseaudio - i dont have an idea when or if it will ever support chmap api

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=ee81abb623cb5e03c182d16871bb4fb34fdc9b4f

do you need a new mapping

map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
+ SNDRV_CHMAP_NA, SNDRV_CHMAP_LFE

or use the default 2.1

+/* default channel maps for 2.1 speakers;
+ * since HD-audio supports only stereo, odd number channels are omitted
+ */
+const struct snd_pcm_chmap_elem snd_pcm_2_1_chmaps[] = {
+ { .channels = 2,
+ .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } },
+ { .channels = 4,
+ .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
+ SNDRV_CHMAP_LFE, SNDRV_CHMAP_LFE } },
+ { }
+};

Revision history for this message
miccs (meomic) wrote :

using default 2.1 would mean that 3rd and 4th channel would get only 0.5 of the whole lfe? or each of them would get 1.0 (exact same copy of the whole signal) ?

if both of them would get 1.0 then i think it should be enough.
the question is how to force driver to give me that mapping? - is some commit like this needed?
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound?id=c6cc3d58b4042f5cadae653ff8d3df26af1a0169

so when asus n56vzz / asus n76vz (my case) instead of asus4mode it would give me hmm lets name it 2.1mode or the number of channels and the channel mapping are not the same thing? i mean i still need to use asus4mode but with smth additional so i would get this particular channel mapping?

Revision history for this message
Raymond (superquad-vortex2) wrote :

D: [pulseaudio] resampler.c: Channel matrix:
D: [pulseaudio] resampler.c: I00 I01 I02 I03 I04 I05
D: [pulseaudio] resampler.c: +------------------------------------

you need to ask David for the channel matrix when

1) downmixing 5.1 to this 2.1 mapping
2) upmix stereo to this 2.1 mapping
3) how 4.0 convert to this 2.1 mapping

http://lists.freedesktop.org/archives/pulseaudio-discuss/2013-October/018989.html

Revision history for this message
Raymond (superquad-vortex2) wrote :

you need to ask Tiwai how to make the driver only support 4 channels and 2.1 mapping when subwoofer is plugged

the current implementation assume internal 2.1 speakers

but your n56vz has stereo internal speaker and a external subwoofer

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_realtek.c?id=ee81abb623cb5e03c182d16871bb4fb34fdc9b4f

+ if (spec->autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT &&
+ spec->autocfg.line_outs == 2)
+ info->stream[SNDRV_PCM_STREAM_PLAYBACK].chmap =
+ snd_pcm_2_1_chmaps;

Revision history for this message
Raymond (superquad-vortex2) wrote :

setup the speaker pin complex 0x16 if the subwoofer is connected before boot

+static void alc663_fixup_asus_sonicmaster(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ if (action != HDA_FIXUP_ACT_PRE_PROBE)
+ return;
+ if (snd_hda_pin_sense(codec, 0x18) == AC_PINSENSE_PRESENCE)
+ snd_hda_codec_set_pincfg(codec, 0x16, 0x99130111);
+}

Revision history for this message
sami (miaousami) wrote :

Hi guys it's been a long time :-)

Are there any news on this features?
Or patchs you want me to test?

Regards

Revision history for this message
David Henningsson (diwic) wrote :

Well, upstream now has a subwoofer quirk for your machine, so this should fix the alsa level if you install the latest drivers ( https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS ).

Then the PulseAudio stuff remains, where my recommendation is to add the stuff as suggested here:

https://<email address hidden>/msg08737.html

I e, you should add this section in /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf and extra-hdmi.conf :

[Mapping analog-surround-21]
device-strings = surround21:%f surround40:%f
channel-map = front-left,front-right,lfe,lfe
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
priority = 8
direction = output

Changed in alsa-driver (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Raymond (superquad-vortex2) wrote :

do the sound preference enable the subwoofer volume slider or just the fade volume slider for 2.1 profile ?

for 5.1 the name is LFE and 2.1 is the bass speaker

Revision history for this message
sami (miaousami) wrote :

Hi David,

thanks for your reply.
I have installed the latest alsa DKMS for my machine : oem-audio-hda-daily-lts-saucy-dkms_0.201402051426~ubuntu12.04.1_all.deb on ubuntu 12.04 with saucy LTS enablement stack.

I also add your recommended section in /usr/share/pulseaudio/alsa-mixer
/profile-sets/default.conf and extra-hdmi.conf.

This made pulse audio crash: I attached a syslog so you can see full log.
You will find things like that:

pulseaudio[2048]: [pulseaudio] alsa-mixer.c: Assertion 'eb = p2->elements' failed at modules/alsa/alsa-mixer.c:3191, function path_set_condense(). Aborting.
pulseaudio[2043]: [pulseaudio] main.c: Daemon startup failed.

Any idea ?

Revision history for this message
sami (miaousami) wrote :

just a small update:
I removed [Mapping analog-surround-21] sections in /usr/share/pulseaudio/alsa-mixer
/profile-sets/default.conf and extra-hdmi.conf

At least pulseaudio can start.
So the [Mapping analog-surround-21] sections make pulseaudio crash...

Revision history for this message
Raymond (superquad-vortex2) wrote :

http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf

[Element Speaker]
switch = off
volume = off

[Element Desktop Speaker]
required = any
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

what is [element desktop speaker] since none of the driver create this control ?

usually business desktops (e.g. Thinkcenter , ....)are equipped with internal speaker

and the driver can
mute speaker when line out or HP is plugged or

mute line out and speaker when HP is plugged

Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Speaker Only' 'Line Out+Speaker'
  Item0: 'Disabled'

Revision history for this message
Raymond (superquad-vortex2) wrote :

 >>j ust a small update:
 I removed [Mapping analog-surround-21] sections in /usr/share/pulseaudio/alsa-mixer
 /profile-sets/default.conf and extra-hdmi.conf

At least pulseaudio can start.
 So the [Mapping analog-surround-21] sections make pulseaudio crash...

http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/daemon/daemon-conf.c

can you provide verbose log by changing log_level in /etc/pulse/daemon.conf

log_level = debug

Revision history for this message
David Henningsson (diwic) wrote :

 > pulseaudio[2048]: [pulseaudio] alsa-mixer.c: Assertion 'eb = p2->elements' failed at modules/alsa/alsa-mixer.c:3191, function
 > path_set_condense(). Aborting.

This bug is fixed in later PulseAudio versions (4.0+). I think you can work around it for now by only specifying one path on the paths-output line. You probably want analog-output-speaker. I e, like this:

[Mapping analog-surround-21]
device-strings = surround21:%f surround40:%f
channel-map = front-left,front-right,lfe,lfe
paths-output = analog-output-speaker
priority = 8
direction = output

Revision history for this message
sami (miaousami) wrote :
Download full text (3.5 KiB)

Hi,

I decided to update to pulseaudio-4.99.3 to get rid of debugging on an old pulseaudio

The good new is that it is almost working well :-)
There are three remaining bugs:
- [not so important] adjusting subwoofer level in gnome sound settings menu doesn't work (it doesn't affect level of anything)
- [quite annoying] when I use rhythmbox or banshee, I ALWAYS have to resetup mode in the sound settings panel or the subwoofer won't work. When I say always, I mean between each song! So I have to set mode to anything else than "Analog surround 2.1" and then back to "Analog surround 2.1"...
- [not important?] Pulse is complaining a lot in my syslog:

Feb 9 15:34:30 meuhmeuh pulseaudio[1857]: [pulseaudio] authkey.c: Failed to open cookie file '/etc/timidity/.config/pulse/cookie': No such file or directory
Feb 9 15:34:30 meuhmeuh pulseaudio[1857]: [pulseaudio] authkey.c: Failed to load authorization key '/etc/timidity/.config/pulse/cookie': No such file or directory
Feb 9 15:34:30 meuhmeuh pulseaudio[1857]: [pulseaudio] authkey.c: Failed to open cookie file '/etc/timidity/.pulse-cookie': No such file or directory
Feb 9 15:34:30 meuhmeuh pulseaudio[1857]: [pulseaudio] authkey.c: Failed to load authorization key '/etc/timidity/.pulse-cookie': No such file or directory
Feb 9 15:34:30 meuhmeuh pulseaudio[1857]: [pulseaudio] authkey.c: Failed to open cookie file '/etc/timidity/.config/pulse/cookie': No such file or directory
Feb 9 15:34:30 meuhmeuh pulseaudio[1857]: [pulseaudio] authkey.c: Failed to load authorization key '/etc/timidity/.config/pulse/cookie': No such file or directory
Feb 9 15:34:30 meuhmeuh pulseaudio[1857]: [autospawn] core-util.c: Home directory not accessible: Permission denied
Feb 9 15:34:30 meuhmeuh pulseaudio[1857]: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
Feb 9 15:34:30 meuhmeuh pulseaudio[1857]: [pulseaudio] main.c: Failed to acquire autospawn lock
Feb 9 15:34:33 meuhmeuh pulseaudio[2066]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/lightdm/.config/pulse/cookie': No such file or directory
Feb 9 15:34:33 meuhmeuh pulseaudio[2066]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/lightdm/.config/pulse/cookie': No such file or directory
Feb 9 15:34:34 meuhmeuh pulseaudio[2076]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/lightdm/.config/pulse/cookie': No such file or directory
Feb 9 15:34:34 meuhmeuh pulseaudio[2076]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/lightdm/.config/pulse/cookie': No such file or directory
Feb 9 15:34:35 meuhmeuh pulseaudio[2069]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/lightdm/.config/pulse/cookie': No such file or directory
Feb 9 15:34:35 meuhmeuh pulseaudio[2069]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/lightdm/.config/pulse/cookie': No such file or directory
Feb 9 15:34:35 meuhmeuh pulseaudio[2095]: [pulseaudio] pid.c: Daemon already running.
Feb 9 15:34:40 meuhmeuh pulseaudio[2250]: [pulseaudio] authkey.c: Failed to open cookie file '/home/sam/.config/pulse/cookie': No such file or directory
Feb 9 15:34:40 meuhmeuh pulseaudio[2250]: [pulseau...

Read more...

Revision history for this message
miccs (meomic) wrote :

@sami
can you download these 'songs' - tests and check if it is really working like it should?

1: http://up.muub.net/d/503d/left_noise_right_silence.mp3.html
2: http://up.muub.net/d/7d69/left_silence_right_noise.mp3.html
3: http://up.muub.net/d/ab13/left_sine_bass_right_noise.mp3.html

just like the titles of songs are saying:
1: have left channed filled with pink noise, right channel have nothing (is silent)
2: have left channel filled with nothing(is silent), right have pink noise
3: have left channel filled with sine and bass, right have pink noise

if you can hear anything from the external woofer in examples 1 and 2 then it is not working
if you can hear anything else than bass from the external woofer in the example 3 then it is not working
and if you can hear both sine and bass and pink noise from example 3 then that means it is mixing both channel
same applies to examples 1 and 2 - if you can hear pink noise from woofer then it is playing frequencies from left / right channel which it shouldnt

ps. ive posted links to audios - not sure if i can add such attachments (each have 2mb or so) - if ive done wrong then sorry

Revision history for this message
sami (miaousami) wrote :

Hi meomic,
after listening to your samples I guess the subwoofer is mixing left and right and lowpassing them (before all those patches it was playing the same as right channel)

Maybe David could confirm or not the behaviour as it is coded...

This doesn't seem to be wrong to me, is it?

Revision history for this message
miccs (meomic) wrote :

sounds great - going to try tomorrow
as to your 'quite annoying' - do you have enable-lfe-remixing = yes in /etc/pulseaudio/daemon enabled? - i had same and it helped see #60

ps. can you post your /etc/pulse/daemon.conf here? - i just want to be sure to start with same setup as you and improve it

thanks

Revision history for this message
Raymond (superquad-vortex2) wrote :

http://git.alsa-project.org/?p=alsa-plugins.git;a=blob;f=doc/upmix.txt;hb=HEAD

http://git.alsa-project.org/?p=alsa-plugins.git;a=blob;f=mix/pcm_upmix.c;hb=HEAD

upmix_2_to_21 is similar to upmix_2_to_51 without delayed_copy

static void upmix_2_to_21(snd_pcm_upmix_t *mix,
                          const snd_pcm_channel_area_t *dst_areas,
                          snd_pcm_uframes_t dst_offset,
                           const snd_pcm_channel_area_t *src_areas,
                           snd_pcm_uframes_t src_offset,
                           snd_pcm_uframes_t size)
{
        snd_pcm_areas_copy(dst_areas, dst_offset, src_areas, src_offset,
                            2, size, SND_PCM_FORMAT_S16);

          average_copy(dst_areas + 2, dst_offset, src_areas, src_offset,
                     2, size);
  }

Revision history for this message
Raymond (superquad-vortex2) wrote :

how about

[Mapping analog-surround-21]
device-strings = hw:%f
channel-map = front-left,front-right,lfe,lfe
paths-output = analog-output-speaker
priority = 8
direction = output

Revision history for this message
miccs (meomic) wrote :

as for now i cant get anything more than i had (right channel copied)

ive upgraded alsa to this: oem-audio-hda-daily-dkms - 0.201402051428~ubuntu13.10.1
after upgrade i can choose 4.0 in pulse w/o adding pins to rc.local so it works good
im using ubuntu 13.10 and standard pulseaudio (i didnt upgraded this yet)

ive added this:
[Mapping analog-surround-21]
; device-strings = hw:%f
device-strings = surround21:%f surround40:%f
channel-map = front-left,front-right,lfe,lfe
; single path-output is a workaround for old pulse - next lts should be ok
paths-output = analog-output-speaker
; paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
priority = 8
direction = output

to files /usr/share/pulseaudio/alsa-mixer/profile-sets/ default.conf and extra-hdmi.conf
(i can choose 2.1 in pulse so it is ok)

tried both
device-strings = hw:%f
device-strings = surround21:%f surround40:%f
didnt heard any difference between them (still right copied)

and in my /etc/pulse/daemon.conf i dont have anything that could collide - stock config for tests (see attached)

so it is just me or version of pulseaudio really makes that difference here?

btw. pulse dont crash when using single paths-output

would be nice to have your pulseaudio configs and if that wont help i will compile newer pulseaudio (there are really no ppas / debs for newer ones?)

Revision history for this message
Raymond (superquad-vortex2) wrote :

you have to provide pulseaudio verbose log

there should be a channel matrix which show the ratio of the mix input and output

Revision history for this message
Raymond (superquad-vortex2) wrote :

try

 speaker-test -c 2 -t wav -D pulse

and

speaker-test -c 6 -t wav -D pulse

check the channel matrix in the pulseaudio log when you use 2.1 profile

Revision history for this message
miccs (meomic) wrote :
Download full text (3.8 KiB)

using speaker-test -c 2 -t wav -D pulse no sound in the subwoofer can be heard - its good (left / right internal speakers can be heard)

using speaker-test -c 6 -t wav -D pulse
from internal left speaker can be heard front- left / front-center
from internal right speaker can be heard front-right / front center
from subwoofer speaker rear-center (on console 5 - lfe is shown then)

when speaker-test -c 2 -t wav -D pulse
( 24.141| 0.000) D: [pulseaudio] resampler.c: Channel matrix:
( 24.141| 0.000) D: [pulseaudio] resampler.c: I00 I01
( 24.141| 0.000) D: [pulseaudio] resampler.c: +------------
( 24.141| 0.000) D: [pulseaudio] resampler.c: O00 | 1,000 0,000
( 24.141| 0.000) D: [pulseaudio] resampler.c: O01 | 0,000 1,000
( 24.141| 0.000) D: [pulseaudio] resampler.c: O02 | 0,000 0,000
( 24.141| 0.000) D: [pulseaudio] resampler.c: O03 | 0,000 0,000
( 24.141| 0.000) I: [pulseaudio] remap.c: Using generic matrix remapping
( 24.141| 0.000) I: [pulseaudio] resampler.c: Using resampler 'speex-float-1'
( 24.141| 0.000) I: [pulseaudio] resampler.c: Using float32le as working format.
( 24.141| 0.000) D: [pulseaudio] resampler.c: Resampler:
( 24.141| 0.000) D: [pulseaudio] resampler.c: rate 48000 -> 44100 (method speex-float-1),
( 24.141| 0.000) D: [pulseaudio] resampler.c: format s16le -> s16le (intermediate float32le),
( 24.141| 0.000) D: [pulseaudio] resampler.c: channels 2 -> 4 (resampling 2)
( 24.141| 0.000) I: [pulseaudio] resampler.c: Choosing speex quality setting 1.
( 24.141| 0.000) D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=8, prebuf=0, minreq=1 maxrewind=0
( 24.141| 0.000) D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=8, prebuf=0, minreq=8 maxrewind=0
( 24.141| 0.000) I: [pulseaudio] sink-input.c: Created input 3 "ALSA Playback" on alsa_output.pci-0000_00_1b.0.analog-surround-21 with sample spec s16le 2ch 48000Hz and channel map front-left,front-right

when using speaker-test -c 6 -t wav -D pulse
( 40.965| 0.000) D: [pulseaudio] resampler.c: Channel matrix:
( 40.965| 0.000) D: [pulseaudio] resampler.c: I00 I01 I02 I03 I04 I05
( 40.965| 0.000) D: [pulseaudio] resampler.c: +------------------------------------
( 40.965| 0.000) D: [pulseaudio] resampler.c: O00 | 0,621 0,000 0,069 0,000 0,310 0,000
( 40.965| 0.000) D: [pulseaudio] resampler.c: O01 | 0,000 0,621 0,000 0,069 0,310 0,000
( 40.965| 0.000) D: [pulseaudio] resampler.c: O02 | 0,000 0,000 0,000 0,000 0,000 1,000
( 40.965| 0.000) D: [pulseaudio] resampler.c: O03 | 0,000 0,000 0,000 0,000 0,000 1,000
( 40.965| 0.000) I: [pulseaudio] remap.c: Using generic matrix remapping
( 40.965| 0.000) I: [pulseaudio] resampler.c: Using resampler 'speex-float-1'
( 40.965| 0.000) I: [pulseaudio] resampler.c: Using float32le as working format.
( 40.965| 0.000) D: [pulseaudio] resampler.c: Resampler:
( 40.965| 0.000) D: [pulseaudio] resampler.c: rate 48000 -> 44100 (method speex-float-1),
( 40.965| 0.000) D: [pulseaudio] resampler.c: format s16le -> s16le (intermediate float32le),...

Read more...

Revision history for this message
Raymond (superquad-vortex2) wrote :

( 24.141| 0.000) D: [pulseaudio] resampler.c: I00 I01
( 24.141| 0.000) D: [pulseaudio] resampler.c: +------------
( 24.141| 0.000) D: [pulseaudio] resampler.c: O00 | 1,000 0,000
( 24.141| 0.000) D: [pulseaudio] resampler.c: O01 | 0,000 1,000
( 24.141| 0.000) D: [pulseaudio] resampler.c: O02 | 0,000 0,000
( 24.141| 0.000) D: [pulseaudio] resampler.c: O03 | 0,000 0,000

O02 and O03 should be 0.5 0.5

Revision history for this message
miccs (meomic) wrote :

this log is with
-enable-lfe-remixing = yes enabled in pulse

( 13.877| 0.000) I: [pulseaudio] resampler.c: Forcing resampler 'copy', because of fixed, identical sample rates.
( 13.877| 0.000) D: [pulseaudio] resampler.c: Channel matrix:
( 13.877| 0.000) D: [pulseaudio] resampler.c: I00 I01
( 13.877| 0.000) D: [pulseaudio] resampler.c: +------------
( 13.877| 0.000) D: [pulseaudio] resampler.c: O00 | 1,000 0,000
( 13.877| 0.000) D: [pulseaudio] resampler.c: O01 | 0,000 1,000
( 13.877| 0.000) D: [pulseaudio] resampler.c: O02 | 0,500 0,500
( 13.877| 0.000) D: [pulseaudio] resampler.c: O03 | 0,500 0,500
( 13.877| 0.000) I: [pulseaudio] remap.c: Using generic matrix remapping
( 13.877| 0.000) I: [pulseaudio] resampler.c: Using resampler 'copy'
( 13.877| 0.000) I: [pulseaudio] resampler.c: Using s16le as working format.
( 13.877| 0.000) D: [pulseaudio] resampler.c: Resampler:
( 13.877| 0.000) D: [pulseaudio] resampler.c: rate 44100 -> 44100 (method copy),
( 13.877| 0.000) D: [pulseaudio] resampler.c: format float32le -> s16le (intermediate s16le),
( 13.877| 0.000) D: [pulseaudio] resampler.c: channels 2 -> 4 (resampling 2)
( 13.877| 0.000) D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=8, prebuf=0, minreq=1 maxrewind=0
( 13.877| 0.000) D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=8, prebuf=0, minreq=8 maxrewind=0
( 13.877| 0.000) I: [pulseaudio] sink-input.c: Created input 1 "pulsesink probe" on alsa_output.pci-0000_00_1b.0.analog-surround-21 with sample spec float32le 2ch 44100Hz and channel map front-left,front-right

and i can confirm that it is playing both channels (all frequencies - not only low)
same happens with enable-lfe-remixing = no (command commented out) but during playback i change to analog-stereo-duplex pulse audio profile and then again to 2.1 - all freqs from subwoofer can be heard

so
it is good that it mix 0.5 of left and 0.5 of right (and not only right) but it should take only low freqs - is there a way to make it happen?

Revision history for this message
miccs (meomic) wrote :

for now best thing i can acheive is:
pulse in config : enable-lfe-remixing=no (or just comment it)
set profile 2.1

and then use mplayer to play music and upmix it there to 5.1 and lowpass it there
as described here: http://www.mplayerhq.hu/DOCS/HTML/en/advaudio-channels.html
-af pan=6:1:0:0:0:0:0.5:0:1:0:0:0:0.5:0.0.0.0.0.0:0.0.0.0.0.0:0.0.0.0.0.0:0.0.0.0.0.0,sub=80:5
this will make left = left , right = right and lfe=0.5(left) and 0.5(right) and lowpass it (you can make that 80 go lower to 60 or to any of your likings).

playing this make pulse do this:
Channel matrix:
( 1.982| 0.000) D: [pulseaudio] resampler.c: I00 I01 I02 I03 I04 I05
( 1.982| 0.000) D: [pulseaudio] resampler.c: +------------------------------------
( 1.982| 0.000) D: [pulseaudio] resampler.c: O00 | 0,621 0,000 0,069 0,000 0,310 0,000
( 1.982| 0.000) D: [pulseaudio] resampler.c: O01 | 0,000 0,621 0,000 0,069 0,310 0,000
( 1.982| 0.000) D: [pulseaudio] resampler.c: O02 | 0,000 0,000 0,000 0,000 0,000 1,000
( 1.982| 0.000) D: [pulseaudio] resampler.c: O03 | 0,000 0,000 0,000 0,000 0,000 1,000
( 1.982| 0.000) I: [pulseaudio] remap.c: Using generic matrix remapping
( 1.982| 0.000) I: [pulseaudio] resampler.c: Using resampler 'copy'
( 1.982| 0.000) I: [pulseaudio] resampler.c: Using s16le as working format.
( 1.982| 0.000) D: [pulseaudio] resampler.c: Resampler:
( 1.982| 0.000) D: [pulseaudio] resampler.c: rate 44100 -> 44100 (method copy),
( 1.982| 0.000) D: [pulseaudio] resampler.c: format float32le -> s16le (intermediate s16le),
( 1.982| 0.000) D: [pulseaudio] resampler.c: channels 6 -> 4 (resampling 4)
( 1.982| 0.000) I: [pulseaudio] sink-input.c: Created input 0 "audio stream" on alsa_output.pci-0000_00_1b.0.analog-surround-21 with sample spec float32le 6ch 44100Hz and channel map front-left,front-right,rear-left,rear-right,front-center,lfe

so left and right will be ~60% of their orig volume - as it mixes it with silence...
so just make left/right volume in pulse a little bit louder than woofer and voila
it should sound like this from any player through pulse alone (system-wide)

Revision history for this message
David Henningsson (diwic) wrote :

> - [quite annoying] when I use rhythmbox or banshee, I ALWAYS have to resetup mode in the sound settings panel or the
> subwoofer won't work. When I say always, I mean between each song! So I have to set mode to anything else than "Analog
> surround 2.1" and then back to "Analog surround 2.1"...
> - [not important?] Pulse is complaining a lot in my syslog:

These two are probably related. It looks like pulseaudio is restarting for some reason. Could you see if you could reproduce it with a PulseAudio verbose log ( https://wiki.ubuntu.com/PulseAudio/Log )? I e, start PulseAudio in verbose mode, play songs, and see if the command quits unexpectedly.

Revision history for this message
sami (miaousami) wrote :

Hi david,

here is a verbose log where I made some tests switching from a song to another and loosing subwoofer output.

I cannot find anything inside that look like an error from my modest user point of view...
Here are the approximate timestamps and actions during the trace:

00 : Start Pulse
33 : start banshee then start a song (takes a few seconds to load a nice song :-)) --> no sound in the subwoofer
55 : switched to Analog surround 4.0. -->Subwoofer begins to work
70 : switched back to Analog surround 2.1 -->Subwoofer remains working
99 : changed song --> no sound in subwoofer
115 : no sound in the subwoofer, so switched to Analog surround 4.0. Subwoofer begins to work
124 : switched back to Analog surround 2.1 : subwoofer remains working
160 : tested a few pause/unpause (not stop) for less or more than 5s : no problem to report, subwoofer keeps working

Any clue?

@meomic: do you still need a configuration sample?
I added exactly what David asked in post #76 on a fresh compiled pusleaudio-4.99.3.
NB: as I recompiled pulse with default options, my config files are located in /usr/local/share/pulseaudio/alsa-mixer/profile-sets/
A small but (I hope) helpful tip to compile pulse : ./configure --enable-udev --with-speex
And some dependencies (incomplete so don't rely 100% on it) : apt-get install libspeexdsp-dev libspeex-dev libudev-dev
libsndfile1-dev libcap-dev intltool libjson0-dev
I also removed the tweaks done in the initial bug report (pins reconfiguration)

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
David Henningsson (diwic) wrote :

Thanks for the log - it looks like the error is with the channel matrix:

Here's where it does not work, i e, no sound sent to O02 and O03:

( 39.718| 0.000) D: [pulseaudio] resampler.c: I00 I01
( 39.718| 0.000) D: [pulseaudio] resampler.c: +------------
( 39.718| 0.000) D: [pulseaudio] resampler.c: O00 | 1.000 0.000
( 39.718| 0.000) D: [pulseaudio] resampler.c: O01 | 0.000 1.000
( 39.718| 0.000) D: [pulseaudio] resampler.c: O02 | 0.000 0.000
( 39.718| 0.000) D: [pulseaudio] resampler.c: O03 | 0.000 0.000

Surround 4.0 looks like this:

( 61.474| 0.000) D: [pulseaudio] resampler.c: I00 I01
( 61.474| 0.000) D: [pulseaudio] resampler.c: +------------
( 61.474| 0.000) D: [pulseaudio] resampler.c: O00 | 1.000 0.000
( 61.474| 0.000) D: [pulseaudio] resampler.c: O01 | 0.000 1.000
( 61.474| 0.000) D: [pulseaudio] resampler.c: O02 | 1.000 0.000
( 61.474| 0.000) D: [pulseaudio] resampler.c: O03 | 0.000 1.000

Working surround 2.1 looks like this:

( 70.122| 0.000) D: [pulseaudio] resampler.c: I00 I01
( 70.122| 0.000) D: [pulseaudio] resampler.c: +------------
( 70.122| 0.000) D: [pulseaudio] resampler.c: O00 | 1.000 0.000
( 70.122| 0.000) D: [pulseaudio] resampler.c: O01 | 0.000 1.000
( 70.122| 0.000) D: [pulseaudio] resampler.c: O02 | 0.500 0.500
( 70.122| 0.000) D: [pulseaudio] resampler.c: O03 | 0.500 0.500

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://bugzilla.kernel.org/attachment.cgi?id=127171

seem windows provide low pass filter by software

Revision history for this message
David Henningsson (diwic) wrote :

Okay, found it. So, to enable the subwoofer for non-subwoofer source material (such as a stereo source), you need to set
enable-lfe-remixing = yes
in /etc/pulse/daemon.conf

And the fact that LFE remixing was suddenly enabled by switching profiles was a bug, sent a patch here:
http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-February/020122.html

Revision history for this message
David Henningsson (diwic) wrote :

 > A small but (I hope) helpful tip to compile pulse

To install current build dependencies do:
sudo apt-get build-dep pulseaudio --no-install-recommends

When I use the upstream git version of PulseAudio I follow this guide for how to set it up: http://colin.guthr.ie/2010/09/compiling-and-running-pulseaudio-from-git/

Revision history for this message
David Henningsson (diwic) wrote :

Just a heads up that the userspace improvements to 2.1 surround can now be tested in 14.04 by adding this ppa: https://launchpad.net/~diwic/+archive/surround21
(and rebooting afterwards).

Revision history for this message
miccs (meomic) wrote :

just tested that ppa and still have problems

with lfe remixing in pulse:
Channel matrix:
( 4.703| 0.000) D: [pulseaudio] resampler.c: I00 I01
( 4.703| 0.000) D: [pulseaudio] resampler.c: +------------
( 4.703| 0.000) D: [pulseaudio] resampler.c: O00 | 1,000 0,000
( 4.703| 0.000) D: [pulseaudio] resampler.c: O01 | 0,000 1,000
( 4.703| 0.000) D: [pulseaudio] resampler.c: O02 | 0,500 0,500
( 4.703| 0.000) D: [pulseaudio] resampler.c: O03 | 0,500 0,500
( 4.703| 0.000) I: [pulseaudio] remap.c: Using generic matrix remapping
( 4.703| 0.000) I: [pulseaudio] resampler.c: Using resampler 'copy'
( 4.703| 0.000) I: [pulseaudio] resampler.c: Using s16le as working format.
( 4.703| 0.000) D: [pulseaudio] resampler.c: Resampler:
( 4.703| 0.000) D: [pulseaudio] resampler.c: rate 44100 -> 44100 (method copy),
( 4.703| 0.000) D: [pulseaudio] resampler.c: format float32le -> s16le (intermediate s16le),
( 4.703| 0.000) D: [pulseaudio] resampler.c: channels 2 -> 4 (resampling 2)

and without lfe-remixing in pulse:
( 6.639| 0.000) D: [pulseaudio] resampler.c: Channel matrix:
( 6.639| 0.000) D: [pulseaudio] resampler.c: I00 I01
( 6.639| 0.000) D: [pulseaudio] resampler.c: +------------
( 6.639| 0.000) D: [pulseaudio] resampler.c: O00 | 1,000 0,000
( 6.639| 0.000) D: [pulseaudio] resampler.c: O01 | 0,000 1,000
( 6.639| 0.000) D: [pulseaudio] resampler.c: O02 | 0,000 0,000
( 6.639| 0.000) D: [pulseaudio] resampler.c: O03 | 0,000 0,000
( 6.639| 0.000) I: [pulseaudio] remap.c: Using generic matrix remapping
( 6.639| 0.000) I: [pulseaudio] resampler.c: Using resampler 'copy'
( 6.639| 0.000) I: [pulseaudio] resampler.c: Using s16le as working format.
( 6.639| 0.000) D: [pulseaudio] resampler.c: Resampler:
( 6.639| 0.000) D: [pulseaudio] resampler.c: rate 44100 -> 44100 (method copy),
( 6.639| 0.000) D: [pulseaudio] resampler.c: format float32le -> s16le (intermediate s16le),
( 6.639| 0.000) D: [pulseaudio] resampler.c: channels 2 -> 4 (resampling 2)

pulse updated after adding that ppa into ubuntu 14.04 but alsa did not - ubuntu has already newer one - "alsa-lib” 1.0.27.2-3ubuntu6" - it is because of that?
ive tried to force ver - but it wants to remove many apps so in result ive canceled.
would be nice if you could make that ver higher - so i could test (if it is because of that i lack this package)

ps. ive played normal song (stereo) using clementine player (if that matters)

Revision history for this message
Raymond (superquad-vortex2) wrote :

post output of

speaker-test -c 2 -t wav -d -Dsurround21:0

Revision history for this message
miccs (meomic) wrote :
Download full text (3.2 KiB)

it cant see such pcm

speaker-test -c 2 -t wav -d -D surround21:0

speaker-test 1.0.27.2

Playback device is surround21:0
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21:0
Playback open error: -2,No such file or directory

aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default
    Playback/recording through the PulseAudio sound server
sysdefault:CARD=PCH
    HDA Intel PCH, ALC663 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    Front speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Digital
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    Direct sample mixing device
dmix:CARD=PCH,DEV=1
    HDA Intel PCH, ALC663 Digital
    Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=1
    HDA Intel PCH, ALC663 Digital
    Direct sample snooping device
hw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC663 Digital
    Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC663 Digital
    Hardware device with all software conversions

in pulseaudio i have 2.1 profile

here is the output of default pcm (in pulse 2.1 profile is set) -- pulse have enable lfe remixing in conf set to yes

speaker-test -c 2 -t wav -d

speaker-test 1.0.27.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 1048576
Period size range from 32 to 349526
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:
  stream : PLAYBACK
  access : RW_INTERLEAVED
  format : S16_LE
  subformat : STD
  channels : 2
  rate : 48000
  exact rate : 48000 (48000/1)
  msbits : 16
  buffer_size : 1048576
  period_size : 262144
  period_time : 5461333
  tstamp_mode : NONE
  period_step : 1
  avail_min : 262144
  period_event : 0
  start_threshold : 1048576
  stop_threshold : 1048576
  silence_threshold: 0
  silence_size : 0
  boundary : 4611686018427387904
 0 - Front Left
 1 - Front Rig...

Read more...

Revision history for this message
Raymond (superquad-vortex2) wrote :

http://git.alsa-project.org/?p=alsa-lib.git;a=log;h=1af088e39b75a0a0897c7036487b143e983cd423

these two patches require 5.1 channel

and you need to hack the driver by putting speaker pin, headphone pin and subwoofer pin in multiout for 5.1

http://git.alsa-project.org/?p=alsa-lib.git;a=log;h=48f1b308cc66152eb6db66742dd0d08d888cda8

 these three seem try to remove the restriction

Revision history for this message
Raymond (superquad-vortex2) wrote :

does surround21 really work since it use route plugin but route plugin does not support rewind ?

Revision history for this message
Emilio (emilioea) wrote :

Hello! I'm very new to this (or any) forum but I'd always wanted to participate/collaborate since I first installed Kubuntu back in 2008.
 I have an Asus N56VB and I have the very problems described here, but I can add something more: using the steps described in #34 in https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1040867, and further, I've managed to have audio L+R+LFE.
But if i plug the headphones and unplug them, The sound doesnt come back. Even more, if I plug headphones again now there's no sound even in headphones.
Gstreamer and alsa are running (they don't crash). The only way to have sound again is to power down, then booting.

Has the same happened to anyone else?

I'm running Kubuntu 14.04 64bits.

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/1286021/comments/2

pulseauduo verbose log

https://wiki.ubuntu.com/PulseAudio/Log

how did you get it working on 14.04 ?

you have to post output of alsa-info.sh when sound is working and not working, use diff to find out the difference of the two outputs

Revision history for this message
sami (miaousami) wrote :

Hi guys, it's been a long time this bug has been opened.
It seems there has been some progress and some regressions.

I have now Ubuntu 14.04 with 3.16 kernel (linux-generic-lts-utopic).

When I plug the subwoofer, it outputs the same sound as right speaker.
In ubuntu sound settings, I do not have access anymore to "analog stereo 2.1" output.
There is only "analog stereo output", and "analog stereo 4.0".

According to https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/1286021/ there is some support for 2.1 output.
Can you confirm?
Is there any plan to backport it to 14.04?
Is there any way to install it on 14.04?

Thanks!

Revision history for this message
miccs (meomic) wrote :

2.1 profile is also not available under 14.10

i believe these patches didnt made its way into ubuntu 14.10:
http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=3f140f9022ef0b59b3684edd25e2202a65989669
http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=65be25dd0faa566a74101d5a0f50d5a825b6f1e7

if you want to try(it is not guaranteed that it will change anything) - then you need to build pulseaudio yourself - as there is no ppa(too bad)

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote : Re: [pulseaudio-discuss] Profile switching on headphone plugging (was: LFE filter)

>
>> Hrm, that is actually a good question. In theory, I would expect
>> module-switch-on-port-available to switch profiles between 2.0 and 2.1
>> as headphones are plugged in and out, but in practice,
>>
>> - I'm not 100% sure if our "don't switch to HDMI" might prevent
>> switching from 2.1 to 2.0 when headphones are plugged in, and
>>
>> - As the 2.0 profile is available on speakers, that will continue to
>> be selected when headphones are unplugged.
>>
>> So, while this is not directly related to whether there is an LFE filter
>> or not - we already have a 2.1, 5.1, etc, profiles - indeed the problem
>> might become worse with the LFE filter.
>
>
> Well, I have just tested how today's git version of pulseaudio (without
your patch) behaves when plugging headphones. Yes - the problem is
pre-existing.
>
> The PC under test has analog outputs on the back panel that,
theoretically, can be used as analog 5.1 outputs, and also has headphone
and microphone sockets at the front panel.
>
> So, the test is:
>
> 1. Make sure something (I tested with a cable extender) is plugged in the
line output on the back panel.
> 2. Select the "analog stereo duplex" profile in pavucontrol.
> 3. Look at the Playback devices tab. It should say: Port: Line Out
(plugged in).
> 4. Plug in headphones at the front. Note that the port changes to:
Headphones (plugged in). I.e. exactly as expected.
> 5. Unplug the headphones, watch how the port changes back to Line Out
(plugged in).
> 5. Now select the Analog Surround 5.1 + Stereo Input as a profile. Now
the port stays as Line Out (plugged in), but the volume control becomes
6-channel.
> 6. Plug headphones in. Result: the port stays as Line Out (plugged in),
with 6-channel volume control, and speaker-test -c6 does not reach
headphones.
>
> Sorry, I cannot retest this at home without additional jack-retasking
(which could make the result untrustworthy), because my home PC does not
have any audio sockets at the front panel.
>

I have doubt about changing 5.1 profile to stereo when headphone is plugged
since most user use 5.1 profile to watch movie, changing 5.1 profile to
stereo require stop playback of 5.1 and start stereo playback , how can the
application perform video audio sync for this kind of profile switching

Do pulseaudio switch back to 5.1 profile when headphone is pkugged ?

https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1040873

For those Asus N series notebook with external Sonic Master subwoofer,
Seem using jack detection of spdif pin complex for the propretiary jack of
the subwoofer , you need driver create an adhoc jack detection control if
you want to switch from stereo to 2.1 profile when the subwoofer is plugged

Revision history for this message
sami (miaousami) wrote :

Hi,

I just tried Ubuntu 15.04 which embeeds pulse audio 6.0.
In the sound settings panel, I can switch to 2.1 profile, and within test panel, everything works just fine : Left, right and subwoofer.

*But* when I launch any sound application, there is no sound through subwoofer.
I tried Gnome videos, vlc and firefox.
Is there something wrong with the applications?

I think this is weird because if the application outputs stereo tracks, then pulse/alsa should be able to generate a subwoofer track (mix+lowpass) and then output 2.1.
Am I wrong?
Any configuration test I should try?

Revision history for this message
Raymond (superquad-vortex2) wrote :

> I just tried Ubuntu 15.04 which embeeds pulse audio 6.0.
 In the sound settings panel, I can switch to 2.1 profile, and within test panel, everything works just fine : Left, right and subwoofer.

*But* when I launch any sound application, there is no sound through subwoofer.

https://wiki.ubuntu.com/PulseAudio/Log

pactl list sinks

Revision history for this message
sami (miaousami) wrote :

pactl list sinks output on ubuntu 15.04

Revision history for this message
sami (miaousami) wrote :

pulse verbose log for ubuntu 15.04

Revision history for this message
Raymond (superquad-vortex2) wrote :

seem missing this message in log

       pa_log_debug(" lfe filter activated (LR4 type)"

 http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=979f19a434733afba0480e2ba456cccc98362e05

Revision history for this message
sami (miaousami) wrote :

Nice spot...
Should I file a bug report somewhere else for that?

Revision history for this message
Raymond (superquad-vortex2) wrote :

> Should I file a bug report somewhere else for that?

https://bugs.freedesktop.org/enter_bug.cgi?product=PulseAudio

Revision history for this message
sami (miaousami) wrote :
Revision history for this message
miccs (meomic) wrote :

just wanted to report that under ubuntu 15.10 the subwoofer works as it should ie. it has low-pass filter and plays just the "basses" from any 'player' (using myself clementine / smplayer(mpv))
the quality of the bass i would say is comparable to that of a windows - cant tell for sure because so long time passed since this laptop saw windows(ran it for a few hours after it was bought).
if someone has any questions just ask - i can test smth if needed etc.

Revision history for this message
miccs (meomic) wrote :

also it doesnt change profiles in pulse automatically so be sure to change to 2.1 in pavucontrol or use a script that was posted somewhere in this 'bug report'(thread)

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in alsa-driver (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This issue has sat incomplete for more than 60 days now. I'm going to close it as invalid. Please feel free re-open if this is still an issue for you. Thank you.

Changed in alsa-driver (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.