Asus N55SF/N75SF - External subwoofer not working

Bug #871808 reported by Denis Demchenko
156
This bug affects 30 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Asus N55SF laptop with external subwoofer wich connects to dedicated 2.5mm plug. http://www.asus.com/Notebooks/Multimedia_Entertainment/N55SF/
In Windows it works fine but in Ubuntu it not works at all (see Ubuntu Question and Answers #173797 - https://answers.launchpad.net/ubuntu/+question/173797 )

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: pulseaudio 1:1.0-0ubuntu3
ProcVersionSignature: Ubuntu 3.0.0-12.19-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu2
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: denis 1957 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xdf000000 irq 51'
   Mixer name : 'Realtek ALC663'
   Components : 'HDA:10ec0663,10431b73,00100001'
   Controls : 23
   Simple ctrls : 13
Date: Mon Oct 10 19:11:30 2011
ExecutablePath: /usr/bin/pulseaudio
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20111005)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, no user)
 LANG=en_AU.utf8
 SHELL=/bin/bash
SourcePackage: pulseaudio
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/29/2011
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: N55SF.207
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: N55SF
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.:bvrN55SF.207:bd08/29/2011:svnASUSTeKComputerInc.:pnN55SF:pvr1.0:rvnASUSTeKComputerInc.:rnN55SF:rvr1.0:cvnASUSTeKComputerInc.:ct10:cvr1.0:
dmi.product.name: N55SF
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK Computer Inc.
modified.conffile..etc.pulse.daemon.conf: [modified]
mtime.conffile..etc.pulse.daemon.conf: 2011-10-07T16:17:51.250612

Revision history for this message
Denis Demchenko (den-demchenko) wrote :
Revision history for this message
David Henningsson (diwic) wrote :

Interesting, I've never seen an Internal speaker + external subwoofer combo before. Question how this is connected from the Codec's point of view.
Would you be willing to do some testing? If so, please download and install snd-hda-tools from ppa:diwic/misc. Then run "sudo hda-jack-sense-test -a" with the subwoofer plugged and unplugged and see if you get any difference.

affects: pulseaudio (Ubuntu) → alsa-driver (Ubuntu)
Changed in alsa-driver (Ubuntu):
status: New → Incomplete
Revision history for this message
Denis Demchenko (den-demchenko) wrote :

This is output with subwoofer disconnected:

Pin 0x11 (Not connected): present = No
Pin 0x12 (Not connected): present = No
Pin 0x13 (Not connected): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x15 (Not connected): present = No
Pin 0x16 (Not connected): present = No
Pin 0x17 (Not connected): present = No
Pin 0x18 (Black Mic): present = No
Pin 0x19 (Internal Mic): present = No
Pin 0x1a (Not connected): present = No
Pin 0x1b (Not connected): present = No
Pin 0x1d (Not connected): present = No
Pin 0x1e (Internal SPDIF Out): present = No
Pin 0x21 (Black HP Out): present = No

With subwoofer plugged it is so:

Pin 0x11 (Not connected): present = No
Pin 0x12 (Not connected): present = No
Pin 0x13 (Not connected): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x15 (Not connected): present = No
Pin 0x16 (Not connected): present = No
Pin 0x17 (Not connected): present = No
Pin 0x18 (Black Mic): present = No
Pin 0x19 (Internal Mic): present = No
Pin 0x1a (Not connected): present = No
Pin 0x1b (Not connected): present = No
Pin 0x1d (Not connected): present = No
Pin 0x1e (Internal SPDIF Out): present = Yes
Pin 0x21 (Black HP Out): present = No

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

Hmm, so it's connected to the SPDIF out? If you select "Digital out" as your profile (on the hardware tab of "Sound settings"), will it start to play through your subwoofer (but possibly stopping to play through your ordinary speakers)?

Revision history for this message
Denis Demchenko (den-demchenko) wrote :

I tried this before. When I try "Digital Stereo Duplex (IEC958)" or "Digital Stereo Output + Analog Stereo Output" the sound from ordinary speakers stops and in the same time there is no any sound from subwoofer.

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

Ok, then there is no obvious way of getting this working, unfortunately. Chances are that some kind of hidden undocumented processing coefficients have to be enabled for this to work. You could try playing around with hda-analyzer (the hda-analyzer tool is available in the snd-hda-tools package you already installed), trying to activate different pins in different ways and see if you can get something out of it, but I wouldn't bet on it.

Revision history for this message
Denis Demchenko (den-demchenko) wrote :

Finnaly I managed to switch subwoofer on with hda_analyzer tool.
Here exatct steps to make subwoofer on

Node[0x16] PIN - Output amplifier - Val[1] - unmute, check Widget Control - OUT
Node[0x14] PIN - Check Widget Control -IN
Node[0x0e] AUD_MIX - Input amplifier - Val[3] - unmute
Node[0x0b] AUD_MIX - Input amplifier - Val[11] - unmute and set its slider approximately to the middle (this controls volume of subwoofer)

All above make it to switch on.

Node[0x0d] AUD_MIX - Input amplifier Val[3] - this checkbox amplifies suboofer and improve a little sound quality.

I don't know how to make this adjustments to apply automatically as on system reboot everything restores back to the state of disabled suboofer

But there is some problem still exist. As that as I noted soobwoofer sounds not actually as it suppose to be. It plays full range of frequencies and as I hear it parallelled to right channel. When I change balance to left it silence along with rigth channel. In Windows it plays only low frequences and sounds independently from front speakers' balance. I will continiue my attempts with that.

Also there is a MusicNow application (analog of ExpressGate) which boots instantly and provides web surfing and music playing capabilities. It is based on Splashtop OS. This OS based on linux and it boots from Window partition. In its folder bunch of squas

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

Nice! So pin 0x16 is the subwoofer pin then. Could you try setting the pin configuration default to 0x99130112 for pin 0x16 and see what happens? How this can be done is written in this document: http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio.txt

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

(see sections "HD-Audio Reconfiguration" and "Early Patching")

Revision history for this message
Denis Demchenko (den-demchenko) wrote :

For some strange reason I cannot trigger codec reconfiguration:

denis@avtoklav:~$ sudo -i
[sudo] password for denis:

avtoklav ~ # echo 0x16 0x99130112 > /sys/class/sound/hwC0D0/user_pin_configs
avtoklav ~ # sudo echo 1 > /sys/class/sound/hwC0D0/reconfig
echo: write error: Device or resource busy

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

You probably need to kill pulseaudio:

echo autospawn = no >> ~/.pulse/client.conf
killall pulseaudio

Also check with

sudo fuser -v /dev/snd/*

for other processes currently using sound cards.

Revision history for this message
Denis Demchenko (den-demchenko) wrote :

I successfully reconfigured codec with new pin configuration but it did not switch on suboofer. :(

Revision history for this message
Sergey Filkin (sergey-filkin) wrote : Re: [Bug 871808] Re: Asus N55SF - External subwoofer not working

>Could you try setting the
>pin configuration default to 0x99130112 for pin 0x16

Could you explain, why this particular value?

Revision history for this message
A-ruhier (a-ruhier) wrote : Re: Asus N55SF - External subwoofer not working

Thanks a lot Denis, it works perfectly on Arch Linux ! I just did what you said in the post 10, but I did a "pulseaudio -k" before, otherwise I have the same message as you.

Revision history for this message
A-ruhier (a-ruhier) wrote :

Since I did an update of my kernel (linux 3.1.4) on Arch Linux, this solution doesn't work anymore ...
I tried to do exactly what you did in the hda_analyzer tool, but I can't get the subwoofer working.

Before, I put your 2 commands in the rc.local file, and it works perfectly.

Any idea ?

Revision history for this message
Denis Demchenko (den-demchenko) wrote :

Can you tell what commands you added to rc.local?
I'm still running 3.0.0-12 as it makes no difference for me.

Revision history for this message
A-ruhier (a-ruhier) wrote :

# /etc/rc.local

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

# end

It worked on the 3.0 kernel version. But the most weird is that even if I do the changes you did in the hda_analyser tool to switch on the subwoofer, it doesn't change anything for me ...

Revision history for this message
Andrew (ncrmnt) wrote :

The codec and the wiring on this laptop are identical to N75SF, which I recently purchased.
Attached is the draft patch that fixes most of the troubles and adds more controls.
Features:
* Automute toggling for headphone plug
* HP jack retasking for mic-in/hp-out/line-out/line-in.
* Subwoofer amp toggling (off in 2 channel mode => saves battery)
* LFE volume regulation
Those retarded ‘genius’ guys from asus decided to wire the internal mic to the jack on the codec that can be configured as line-out, while external mic can only work as a mic.

Sensing of subwoofer presense doesn’t work yet. I just couldn’t make sense how it works: it’s not acpi, not codec’s GPIO, not regular pin presense of PIN 0×16.
I'm cleaning up the code before sending it to alsa devel.
external mic-in, spdif and line-in of HP pin needs testing, I don't have the hardware along with me at the moment. If someone can do it - plz drop me a note, so that I can fix it.
Patch is against kernel 3.1.6 (tested in Agilia Linux, I don't use ubuntu/kubuntu any more, sorry)

Revision history for this message
Andrew (ncrmnt) wrote :

P.S. Example asoundrc for 2.1 upmix (Thanks to K900 from agilialinux developer jabber conference) is as follows:

pcm.upmix21 {
    type route
    slave.pcm surround41
    slave.channels 5
    ttable.0.0 1
    ttable.1.1 1
    ttable.0.4 0.5
    ttable.1.4 0.5
}

pcm.!default upmix21

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Draft patch against 3.1.6. Still needs some testing and cleanup" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Andrew (ncrmnt)
summary: - Asus N55SF - External subwoofer not working
+ Asus N55SF/N75SF - External subwoofer not working
Revision history for this message
Andrew (ncrmnt) wrote :

A cleaned up version with more features as sent to alsa-devel.
Thread at alsa-devel: http://mailman.alsa-project.org/pipermail/alsa-devel/2012-January/047844.html

Revision history for this message
Rene Arts (renearts) wrote :

I have a N55SF as well and I would like to apply this patch. I searched how to do this but could not find the right way to succeed. Can you explain me how to integrate the patch?

Revision history for this message
Andrew (ncrmnt) wrote :

@Rene Arts: It requires to recompile the kernel. Get the kernel source, patch -p1 < nx5sf.patch, compile and you are done. Agilia linux already has this patch in stable, not sure about ubuntu.
It is tested with 3.1.6 and 3.1.8 kernels. 3.2 requires some forward-porting which I'll do later.

Revision history for this message
Rene Arts (renearts) wrote :

I used [url=http://www.question-defense.com/2010/09/26/how-to-recompile-your-ubuntu-10-10-kernel-for-patching-or-to-add-support-for-a-specific-device]this[/url] manual to download and prepare the kernel, then tried to apply the patch at step 5 with the command you issued using the nx5.patch from the 2012-01-05 post.
It then comes up with the following error:

~/source/linux-3.0.0# patch -p1 < nx5.patch
The next patch would create the file sound/pci/hda/alc662_asus_nx5_quirks.c,
which already exists! Assume -R? [n] n
Apply anyway? [n] n
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 117
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/sound/pci/hda/alc662_quirks.c b/sound/pci/hda/alc662_quirks.c
|index e69a6ea..93fa802 100644
|--- a/sound/pci/hda/alc662_quirks.c
|+++ b/sound/pci/hda/alc662_quirks.c
--------------------------
File to patch:

I think I'm close, but don't know how to fix it.

Revision history for this message
Andrew (ncrmnt) wrote :

@Rene: if alc662_asus_nx5_quirks.c already exists, you have either already applied the patch or you have got it bundled from whatever your kernel came from.

Revision history for this message
Rene Arts (renearts) wrote :

Started over from a fresh download of the kernel, then next comes up when I apply the patch:

patch -p1 < ~/nx5.patch
patching file sound/pci/hda/alc662_asus_nx5_quirks.c
can't find file to patch at input line 117
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/sound/pci/hda/alc662_quirks.c b/sound/pci/hda/alc662_quirks.c
|index e69a6ea..93fa802 100644
|--- a/sound/pci/hda/alc662_quirks.c
|+++ b/sound/pci/hda/alc662_quirks.c
--------------------------
File to patch:

Note: when I open ALSA mixer the tab mentions Realtek ALC663, and I cannot find a subwoofer slider.

Revision history for this message
Andrew (ncrmnt) wrote :

@Rene Arts (renearts) :
You should cd to the kernel buildtree (e.g. where you run make menuconfig from) and apply it from there. The text above clearly shows that you haven't applied the patch.

Revision history for this message
Rene Arts (renearts) wrote :

I think I was in the right directory, but I'll wait for 12.04 to hopefully solve it :)

Revision history for this message
Frans van Basten (linux4me) wrote :

Is the patch already available for kernel version 3.2 already available? I would like to test this on my Asus N75S.

Revision history for this message
Martin Gasparek (martin-gaspo) wrote :

I just installed precise pangolin, and upgraded kernel to 3.3 and subwoofer still not working .

Revision history for this message
stefano (zeno-l) wrote :

I have the exact same issue n my Asus N55SL: no working subwoofer.

I am running Linux Mint Debian Edition on kernel 3.2.0-2-amd64.
Alsa-base version 1.0.23+dfsg-4 installed;
Pulseaudio 1.1-3.

To get the subwoofer switched on you can run this python script (created by HDA analyzer):
http://pastebin.com/TstxjNKz

Hope that th script will be useful for others!
Cheers,
Stefano aka zeno

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

Hello,

Installed yesterday with daily iso burnt to a CD, exact same problem.
Hardware is Asus N55SF-S1437V.

Not yet tried stefano's script.

Revision history for this message
A-ruhier (a-ruhier) wrote :

Hello,
I tried your script stefano, but it doesn't work for me. I haven't any error (I just have to launch it with python 2.7, if i don't I have some errors), and I tried to debug it but I don't understand why it doesn't work...

ArchLinux 3.3.2
Alsa 1.0.25
Pulseaudio 1.1-2

I have to add that before I passed to Linux 3.0 I could clone the right-speak out to go to the subwoofer, it wasn't a clean fix but it was temporary. When I upgrade my kernel to the 3.0 version, it didn't work anymore.

Many Thanks for your script ;)

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

Hi,

I've spent some of today analysing this issue. It was a little sad that nobody picked up Andrew's patch upstream, but writing model parsers are deprecated today.

Anyway, I believe there is a simpler solution, so can you please try to edit /etc/modprobe.d/alsa-base.conf and add this line:

options snd-hda-intel model=asus-mode4

...reboot to test. If this does not work, follow the instructions here: https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS
Now try these new drivers in combination with the above configuration file change.

Also note that you might need to raise the "Bass Speaker" volume in alsamixer as well.

If any of these approaches help you (and does not cause any other regressions), please respond with your alsa-info ( https://wiki.ubuntu.com/Audio/AlsaInfo ) so I can send your fix upstream. Thank you!

Revision history for this message
A-ruhier (a-ruhier) wrote :

Thank you, it works !

But the problem is the same as before I upgraded to Linux 3.0 : the right-speak out is cloned to send a signal to the subwoofer, so these two outs are not separated.
It does that the rendering is not as good as that I have in Windows.

Revision history for this message
Craig (cmp2488) wrote :

Works for me also, with the same caveat as A-ruhier that the right channel audio seems cloned through the subwoofer. Here is my alsa info:
http://www.alsa-project.org/db/?f=fd04933d4663cc51c670ab350d3a31d301ccedeb

And Thanks! :-)

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

So, if you want automatic LFE remixing, that should be possible through PulseAudio:

First, add a new profile for 2.1 by adding this section to /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf:

[Mapping analog-surround-21]
# Note that the line below should NOT be changed to surround21.
device-strings = surround40:%f
channel-map = front-left,front-right,lfe,lfe
paths-output = analog-output analog-output-speaker
priority = 7
direction = output

Second, make sure this line is present in /etc/pulse/daemon.conf:

enable-lfe-remixing = yes

Then restart pulseaudio (run "pulseaudio -k" in a terminal), then select the new profile in the sound settings.

I haven't used LFE remixing myself, so not sure how well it works, but worth a try :-)

Revision history for this message
Craig (cmp2488) wrote :

I follow you up to "select the new profile in sound settings". I've looked all over.. haven't figured out how to do that yet.. probably something I'm just not seeing.. (Ubuntu 12.04 btw).. Ideas? Thanks.

Revision history for this message
Rene Arts (renearts) wrote :

Same here as Craig, but with 11.10. Only the right channel is sent to the subwoofer: can't find the surround profile. I tried the other driver which David suggested, but then sound doesn't work at all. It's a pitty Asus doesn't supply some info to get it to work.

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

@Craig, in 12.04 you would have an entry saying either "Analog Output" or "Speakers" (make sure headphones are not connected). Select that one. What entries do you have in the "Mode" combobox?

Revision history for this message
Craig (cmp2488) wrote :

Looks like, "Analog Stereo Duplex" and "Analog Surround 4.0 Output" both seem to behave about the same other than Surround eventually starts getting "staticy"

Revision history for this message
Rene Arts (renearts) wrote :

I updated to 12.04 the last days and got stuff up and running again. With the described methods still only the right channel is sent to the subwoofer (also applied the pulseaudio modification). In contrary to with 11.10 I now can select the 4 channel options: testing the speakers gives correct results on the front speakers, and rear right on the subwoofer.

Revision history for this message
Simone Esciana (darknephilim91) wrote :

@David Henningsson: your latest fix didn't worked because default.conf wasn't the right file to edit.
Using the command "udevadm info -qall -p /sys/class/sound/card0/" on my laptop I read "PULSE_PROFILE_SET=extra-hdmi.conf", which for some reason is the config file loaded instead of the default one.

So I added your lines to /usr/share/pulseaudio/alsa-mixer/profile-sets/extra-hdmi.conf and now the subwoofer seems to be working well, after choosing the 2.1 profile that is now showing up. The subwoofer isn't playing a copy of the right channel anymore, both are played.

Revision history for this message
Craig (cmp2488) wrote :

@Simone: That is good news, how did you go about changing the sound profile though?... Have not been able to figure that out. Thanks.

Revision history for this message
Rene Arts (renearts) wrote :

I tried Simone's solution as well. MPD now plays the left and right channel via the subwoofer (and off course the front l+r work). Though some other players like Spotify, Rhythmbox only play via the front speakers. In the sound configuration menu the speaker test plays as it should (front l+r and sub). So I think we're quite close to a good and working solution :)

Revision history for this message
Dani (danielperezdeandres) wrote :

I tried the solution by David Henningsson and Simone Esciana and it is almost working, i.e. the sound configuration profile for 2.1 is present and when testing, some white noise comes out of the subwoofer. My problem is that no program (Rhythmbox, Clementine or audio from Chrome) seems to send out anything to the subwoofer.

I have an Asus 76VM

Great work so far!!

Revision history for this message
Rene Arts (renearts) wrote :

Finally got things to work quite nicely :D
I've been fiddling with /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf for some time to get a good grip on controlling the volume levels as the sub-output wasn't influence by my volume control buttons. I changed it so only the PCM channel is altered and the Master, Front Speaker and Bass speaker channels stay at 100%.
Main change is in the first three elements (Hardware Master, Master and Master Front). Don't exactly know though how these are mapped to the Alsa-mixer panel :S.

[General]
priority = 99

[Element Hardware Master]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

[Element Master]
switch = mute
volume = ignore
override-map.1 = all
override-map.2 = all-left,all-right

[Element Master Front]
switch = mute
volume = ignore
override-map.1 = all
override-map.2 = front-left,front-right

[Element Master Mono]
switch = off
volume = off

[Element Line HP Swap]
switch = off

; This profile path is intended to control the default output, not the
; headphones. But it should not hurt if we leave the headphone jack
; enabled nonetheless.
[Element Headphone]
switch = mute
volume = zero

[Element Headphone2]
switch = mute
volume = zero

[Element Speaker]
switch = mute
volume = off

[Element Desktop Speaker]
switch = mute
volume = off

[Element Front]
switch = mute
volume = ignore
override-map.1 = all-front
override-map.2 = front-left,front-right

[Element Rear]
switch = mute
volume = ignore
override-map.1 = all-rear
override-map.2 = rear-left,rear-right

[Element Surround]
switch = mute
volume = ignore
override-map.1 = all-rear
override-map.2 = rear-left,rear-right

[Element Side]
switch = mute
volume = ignore
override-map.1 = all-side
override-map.2 = side-left,side-right

[Element Center]
switch = mute
volume = ignore
override-map.1 = all-center
override-map.2 = all-center,all-center

[Element LFE]
switch = mute
volume = ignore
override-map.1 = lfe
override-map.2 = lfe,lfe

.include analog-output.conf.common

Revision history for this message
sami (miaousami) wrote :

Hi guys,
I was not as lucky as you were...

I have an Asus N56VZ laptop on ubuntu 12.04.
My subwoofer wasn't working (i could only hear some noise from it).

I tested:

1. Post #8: Setting the pin configuration default to 0x99130112 for pin 0x16
--> No changes.

2. Post #34:
edit /etc/modprobe.d/alsa-base.conf and add this line:
options snd-hda-intel model=asus-mode4
--> No changes

3. Post #34: I updated to alsa-hda-dkms_0.201207281618~precise1_all.deb in combination with the edited /etc/modprobe.d/alsa-base.conf
--> No changes

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

4. Finally, it seems that my subwoofer is connected to a different PIN.
I installed snd-hda-tools:
#sudo apt-add-repository ppa:diwic/hda
#sudo apt-get update
#sudo apt-get install snd-hda-tools

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

So I retested an adapted post #8:
#sudo echo 0x1e 0x99130112 > /sys/class/sound/hwC0D0/user_pin_configs
#sudo echo 1 > /sys/class/sound/hwC0D0/reconfig
--> it gave me the same result as many of you : subwoofer worked but seems to be plugged with right channel...
--> I set the mode to "Analog Surround 5.1 output" in the sound settings panel and now it seems to work perfectly...

I uninstalled alsa-hda-dkms_0.201207281618~precise1_all.deb and it still worked.
I removed options snd-hda-intel model=asus-mode4 in /etc/modprobe.d/alsa-base.conf and it stopped work.

Finally, on a fresh install, to make your subwoofer work on Asus N56VZ, you would have to:
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

--> Can you fix it in order to make it work more easily for users ?

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

@sami, Thanks for your comment.

I believe if you do this:

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

...and then reconfig etc, you wouldn't have to do the asus-mode4 tweak as well. The thing is that the kernel driver isn't handling 2.1 very well (I just asked: http://mailman.alsa-project.org/pipermail/alsa-devel/2012-August/054185.html ), so we're "faking" a rear output on pin 0x16 in the above example, and then the third output becomes C/LFE.

Is the above working for you as well?

Revision history for this message
sami (miaousami) wrote :

@David

Indeed, your trick gave me exatly the same result.

Whatever trick I use (your post #49 or my post #48), there are still some limitations:

- When I boot the computer, I have to set the mode to "Analog Stereo Output" first and then back to "Analog Surround 5.1 output" to make the sound work (in the sound settings panel).

- When I put the omputer in sleep mode, there is no way to get sound working on resume

- When I play with the "output volume" in the sound settings panel, it sometimes make the sound become completely crushed (noisy, high pitch peaks). It may become "normal" again if I continue playing...

Let me know how to further investigate !

Revision history for this message
sami (miaousami) wrote :

- When I play with the "output volume" in the sound settings panel, it sometimes make the sound become completely crushed (noisy, high pitch peaks). It may become "normal" again if I continue playing...
--> Correction : it won't become normal if I continue playing with the output volume, but only if I set the mode to "Analog Stereo Output" first and then back to "Analog Surround 5.1 output"

Revision history for this message
Rene Arts (renearts) wrote :

I can second that Sami, got that weird quirk here as well. I think it has something to do with the pulseaudio remixing for the subwoofer, but no exact idea.

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

The crackling sound is probably an unrelated bug, see https://wiki.ubuntu.com/Audio/PositionReporting

Revision history for this message
Rene Arts (renearts) wrote :

I again altered some stuff: I prefer to use the hardware master channel to control volume instead of the PCM (software, meh) channel. Maybe the strange crackling stuff is over now as well as I'm not altering the PCM level anymore :)
I changed /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common to be:

[Element Master]
switch = mute
volume = merge

[Element PCM]
switch = mute
volume = ignore
override-map.1 = all
override-map.2 = all-left,all-right

[Element LFE]
switch = mute
volume = ignore

I think this file overrides the earlier modifications in /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf ?
It works fine now anyway :D

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

does the sonicmaster subwoofer has a TRS connector(stereo) or TS connector (mono)?

do the subwoofer use both channel (left+right) ?

Revision history for this message
Rene Arts (renearts) wrote :

My pulseaudio mixes the left and right channel to a (I suppose) mono channel and then sends it to the sub. Although the subwoofer connector features 4 contacts (TRRS connector). I think for presence detection or dummy load. I unscrewed the plastic barrel and found two wires wired to the voice coil and the two others are connected with a resistor.

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

snd_hda_intel provide copy front (up mixing) feature

http://git.kernel.org/?p=linux/kernel/git/tiwai/sound.git;a=commitdiff;h=4b3acaf5b56f53ef259a6ddf8e17dcb529631d9b;hp=3e289f16ec2e08bbb37ce57a31386ed135887da4

can you hear any sound from the subwoofer for left or right channel?

speaker-test -c2 -D front -t wav

Revision history for this message
Rene Arts (renearts) wrote :

I just tested it: I can hear sound coming from the subwoofer only with 'front right'. I suppose it's connected as a mono device. WIth the test above I think the pulseaudio mixing is bypassed? When I use another program (say Audacity) and then cut away the left, resp. right channel the sub works with both channels as it should.

Oleg (yanukik)
description: updated
Revision history for this message
Raymond (superquad-vortex2) wrote :

how do pulseauio downmix stereo to mono? use (L+R)/2 or (L+R)

can you post the pulseaudio log when you switch to the customised surround40 profile?

Revision history for this message
Rene Arts (renearts) wrote :

As far as I can see it uses (L+R) and then only sends it to the right rear channel, so effectively using only half of the signal (making it (L+R)/2) which should result in the correct level. Here's the log I think you asked for: http://pastebin.com/JiQ4CYBr

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

how do you know it is (L+R) ?

can you post the channel map of pulseaudio log for the corresponding event

speaker-test -c2 -Dpulse -t wav

speaker-test -c6 -Dpulse -twav

speaker-test -c1 -Dpulse -t wav

Revision history for this message
Rene Arts (renearts) wrote :

I don't know it for sure, but with the previous tests I heard no sound coming from the sub with the rear left test signal, but did with the rear right. The sub connector has 4 wires: 2 connected to the sub's voice coil and the two others to a resistor (I think dummy load, could be used for dectection of sub presence on the left channel). Ah wait... while writing the previous sentence the next idea rose: both channels might be (able to be) used. But because the left channel is hooked up to a resistor it off course cannot be heard. So still (L+R) might be used...
I did the tests you asked for anyway, the log is over here: http://pastebin.com/hrjY1d2y

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

your log does not show how pulseaudio upmix stereo to surround21

can you post the output of alsa-info.sh ?

( 67.454| 0.000) D: [pulseaudio] resampler.c: Channel matrix:
( 67.454| 0.000) D: [pulseaudio] resampler.c: I00 I01 I02 I03 I04 I05

( 67.454| 0.000) D: [pulseaudio] resampler.c: +------------------------------------

( 67.454| 0.000) D: [pulseaudio] resampler.c: O00 | 0,675 0,000 0,100 0,000 0,375 0,000

( 67.454| 0.000) D: [pulseaudio] resampler.c: O01 | 0,000 0,675 0,000 0,100 0,375 0,000

( 67.454| 0.000) D: [pulseaudio] resampler.c: O02 | 0,000 0,000 0,000 0,000 0,000 1,000

( 67.454| 0.000) D: [pulseaudio] resampler.c: O03 | 0,000 0,000 0,000 0,000 0,000 1,000

( 67.454| 0.000) I: [pulseaudio] sink-input.c: Created input 18 "ALSA Playback" on alsa_output.pci-0000_00_1b.0.analog-surround-21 with sample spec s16le 6ch 48000Hz and channel map front-left,front-right,rear-left,rear-right,front-center,lfe

( 72.290| 0.000) D: [pulseaudio] resampler.c: Channel matrix:

( 72.290| 0.000) D: [pulseaudio] resampler.c: I00

( 72.290| 0.000) D: [pulseaudio] resampler.c: +------

( 72.290| 0.000) D: [pulseaudio] resampler.c: O00 | 1,000

( 72.290| 0.000) D: [pulseaudio] resampler.c: O01 | 1,000

( 72.290| 0.000) D: [pulseaudio] resampler.c: O02 | 1,000

( 72.290| 0.000) D: [pulseaudio] resampler.c: O03 | 1,000

( 72.291| 0.000) I: [pulseaudio] sink-input.c: Created input 19 "ALSA Playback" on alsa_output.pci-0000_00_1b.0.analog-surround-21 with sample spec s16le 1ch 48000Hz and channel map mono

Revision history for this message
sami (miaousami) wrote :

@David:
I opened two bugs for the N56VZ laptop because I am afraid people become confused between N56VZ and N55SF/N75SF.

Crackling audio when playing with volume on N56VZ:
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1040867

Subwoofer not working on N56VZ:
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1040873

Regards,
Sam

Revision history for this message
Roberto Leinardi (leinardi) wrote :

Someone managed to make the internal subwoofer work with the VIA VT1802?

I tried with “options snd-hda-intel model=auto” in /etc/modprobe.d/alsa-base.conf and “default-sample-channels = 6” in /etc/pulse/daemon.conf but nothing has change: alsamixer only sees two channels.

I'm on Ubuntu 12.10 beta2

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

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

if this proprietary subwoofer is supported by asus laptop which use alc663 , just ignore the misc no_presence bit of pin default ane enable the unsolicited event with special event tag on pin 0x1e. define a customised alc_!633_unsol_event() to handle the event by snd_hda_get_pin_sense of 0x1e to handle the subwoofer at 0x16

Changed in alsa-driver (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Conrado Buhrer (conrado) wrote :

I recently got an Asus N46V. I tried the modprobe options (mentioned on message #34) and the subwoofer works fine with good quality sound. Running Linux Mint 14.

Revision history for this message
Fernando Giraldo (fercho) wrote :

I recently got an Asus N46VJ. I tried the modprobe options (mentioned on message #34) and the subwoofer works fine with good quality sound. Running Ubuntu 12.10

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

Do you need only pin fixup of node 0x16 (subwoofer) or the fixup of other pin by Asus mode 4 ?

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

/sys/class/sound/hwC0D0/init_pin_configs:
0x11 0x411111f0
0x12 0x411111f0
0x13 0x411111f0
0x14 0x99130110
0x15 0x411111f0
0x16 0x411111f0
0x17 0x411111f0
0x18 0x04a11830
0x19 0x99a3093f
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x40079a2d
0x1e 0x99430120
0x21 0x0421101f

Revision history for this message
Amir Eldor (amireldor) wrote :

I have an ASUS N55SF and I've just tried comment #34 and the subwoofer works! This is under Ubuntu 12.04 LTS.

My Alsa Info:
http://www.alsa-project.org/db/?f=d35ace5c8d037aa32728324df8c896de542faef2

It's worth mentioning I have JACK installed as I played around with my E-MU 0404 USB and it also works (but this is off-topic).

Revision history for this message
s0undt3ch (ufs) wrote :

#34 works on an Asus N76VB-T4111H

Revision history for this message
Lars Nyström (xetea) wrote :

#34 works on Asus U500VZ-DB120H, here's my ALSA Info: http://www.alsa-project.org/db/?f=395d5cd66e00138ef457af38ff4d6701b7e05e74

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

Hello,

On Ubuntu 13.10 (fresh install not upgrade) I observed that subwoofer yielded no sound.
So I tested two fixes separately, changes from vanilla configuration are indicated with "-->".

1. Post #8: Setting the pin configuration default to 0x99130112 for pin 0x16
--> Subwoofer plays sound, high frequencies included
--> Muting right channel at source mutes subwoofer, muting left channel at source does not affect subwoofer
--> alsamixer shows a "bass" volume control that affects subwoofer
--> alsamixer master volume affects all channels as expected
--> interference noise in subwoofer, not very loud but clearly audible when ear close to subwoofer

2. Post #34:
edit /etc/modprobe.d/alsa-base.conf and add this line:
options snd-hda-intel model=asus-mode4
--> Same consequences (not tested volume details though)

Interference noise in subwoofer only happens when enabling one of those fixes.
Disappears immediately when doing rmmod snd-hda-intel.

Close attention to this noise, revealed that some noise remains even after rmmod snd-hda-intel, but it's more subtle because more or less the same power as the PC fan noise. As expected, unplugging the subwoofer from the jack removes that noise.

Keeping in mind the usual "hey it's open source, it's done when someone does it philosophy, why is this bug/feature not addressed ?
Because wiring is non-standard ?
Because it's difficult to implement an auto-detect + jack sense feature that just works ?
Because no one really cares (IMHO sound is not that good anyway, any decent external stereo will do much better, so I consider myself in the "not really cares" option) ?

Just my two cents.

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

http://git.alsa-project.org/?p=alsa-lib.git;a=blob_plain;f=test/chmap.c;hb=HEAD

chmap -Dhw:0 query

do you mean that you expect only notebook only support 2 ch by default

 4 ch is only supported when subwoofer is plugged

does the user manual mention that the subwoofer can be plugged (hot- plug0 after the notebooke is power on

Revision history for this message
Lars Nyström (xetea) wrote :

I can confirm gouris observations in #73, but the bass volume control is disabled in case 2.

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

> ind the usual "hey it's open source, it's done when someone does it philosophy, why is this bug/feature not addressed ?
> Because wiring is non-standard ?
> Because it's difficult to implement an auto-detect + jack sense feature that just works ?

it is not hard to implement jack detect

the main problem is no application including pulseaudio can receive stereo and output a four channels (with subwoofer at rear right) output which fit the hardware

pulseaudio can mix stereo but there is no low pass filter

Revision history for this message
Amir Eldor (amireldor) wrote :

(in reponse t o#76)

Raymond, the subwoofer signal is not a different output-bus on this laptop, it's something built into the sound card. There's no need to 'jack detect'. I have this laptop and applied the fix mentioned above. Still, my mixer only shows a stereo output (and the subwoofer works).

The hardware is connected via a proietary jack, not a 1/8" or RCA jack.

What I believe the problem is, is that ALSA does not assign the right "model" according to the firmware ID on this laptop, or some other mumbo-jumbo that I am not familiar with.

Revision history for this message
Mikhail Krutov (k-neko) wrote :

On Asus N76jv, pin is 0x1a.

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

are you sure that only right channel is not due to broken connector ? there is a video in youtube which show how to replace the connector of n55SF

Revision history for this message
Mikhail Krutov (k-neko) wrote :

Raymond,
Right-only channel happens pretty on every subwoofer-enabled laptop from ASUS from what I see in this thread. One could say that this is a miracleous breaking connectors on every ASUS laptop with subwoofer any Ubuntu user touches, however I don't believe this. :)

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

Hi, while going through old bugs I forgot about (sorry!) I noticed that alsa-info has been supplied for UX51VZH and N55SF, so I sent these upstream. If you want me (or someone else) to send your quirk upstream as well, please submit alsa-info ( https://wiki.ubuntu.com/Audio/AlsaInfo ).

http://mailman.alsa-project.org/pipermail/alsa-devel/2014-February/072151.html

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

Hi,

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
Cyril (i3s7) wrote : Re: [Bug 871808] Re: Asus N55SF/N75SF - External subwoofer not working

Hi,
Here you can find my Alsa info :
http://www.alsa-project.org/db/?f=feef90b2cbf3d54b1a01d2106a2b8bb184e12e79
I add the ppa on a kubuntu 14.04 fresh install but there is no sound on
subwoofer
Have a nice day

Le 07/02/2014 09:38, David Henningsson a écrit :
> Hi, while going through old bugs I forgot about (sorry!) I noticed that
> alsa-info has been supplied for UX51VZH and N55SF, so I sent these
> upstream. If you want me (or someone else) to send your quirk upstream
> as well, please submit alsa-info (
> https://wiki.ubuntu.com/Audio/AlsaInfo ).
>
> http://mailman.alsa-project.org/pipermail/alsa-
> devel/2014-February/072151.html
>

Revision history for this message
isomorphismes (isomorphismes) wrote :

Thank you Denis! Your comments got my subwoofer working as well (Ubuntu 12.04), although Node[0x0d] AUD_MIX for me I don't see Val[3] being an amplifier; it's just a mute tickbox.

Revision history for this message
isomorphismes (isomorphismes) wrote :

I'm using an ASUS N56V.

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: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for alsa-driver (Ubuntu) because there has been no activity for 60 days.]

Changed in alsa-driver (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.