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

Bug #1040873 reported by sami on 2012-08-23
88
This bug affects 17 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
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

sami (miaousami) wrote :
description: updated
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)

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

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:

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...

Launchpad Janitor (janitor) wrote :

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

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
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.

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.

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.

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>...

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

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 ?

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);

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?

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...

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

David Henningsson (diwic) wrote :

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

sami (miaousami) wrote :

Hi David,

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

Sam

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...

Raymond (superquad-vortex2) wrote :

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

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

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"...

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...?

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

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

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.

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.

sami (miaousami) wrote :

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

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 ?

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

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)

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

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

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

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

meomic (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

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?

meomic (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)

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

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);
 }

Changed in alsa-driver (Ubuntu):
status: Confirmed → Triaged
44 comments hidden view all 124 comments
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?

meomic (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

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);
  }

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

meomic (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?)

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

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

meomic (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...

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

meomic (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?

meomic (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)

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.

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)

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

Raymond (superquad-vortex2) wrote :

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

seem windows provide low pass filter by software

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

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/

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).

meomic (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)

Raymond (superquad-vortex2) wrote :

post output of

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

meomic (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...

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

Raymond (superquad-vortex2) wrote :

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

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.

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

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!

meomic (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)

>
>> 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

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?

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

sami (miaousami) wrote :

pactl list sinks output on ubuntu 15.04

sami (miaousami) wrote :

pulse verbose log for ubuntu 15.04

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

sami (miaousami) wrote :

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

Raymond (superquad-vortex2) wrote :

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

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

meomic (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.

meomic (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)

Displaying first 40 and last 40 comments. View all 124 comments or add a comment.