Dell Alienware 14, Speaker sound output is mono until a headphone jack is plugged

Bug #1302090 reported by Fabián Ezequiel Gallina on 2014-04-03
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
ALSA driver
Unknown
Unknown
alsa-driver (Ubuntu)
Undecided
Unassigned

Bug Description

Here's the required release and package information:

    Description: Ubuntu Trusty Tahr (development branch)
    Release: 14.04

    Package: linux-image-extra-3.13.0-19-generic
    Version: 3.13.0-19.40

When playing audio through speakers on my Alienware 14 2014, the sound output is in mono until I plug a headphone in any of the two available headphone jacks (obviously, the auto-mute option must be disabled). When I do so, the sound starts to play in stereo.

I would love the sound output to be stereo by default and not be forced to plug anything to achieve that.

Attached is the alsa-info.sh output for my machine.

Raymond (superquad-vortex2) wrote :

Audio and Speakers
Internal High-Definition 5.1 Performance Audio with Dolby Home Theater v4 Software (Standard)
2.1 Speaker configuration with Subwoofer
Audio Powered by Klipsch®
7.1 Digital Audio out using HDMI out connection

(2x) Audio Out 1/8" Ports (One compatible with inline mic headset)
(1x) Line In Microphone 1/8" Port (retaskable for 5.1 analog audio output)

how many internal speakers ?

only stereo speakers at node 0x14

Node 0x14 [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Control: name="Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Speaker Phantom Jack", index=0, device=0
  Amp-In caps: N/A
  Amp-In vals: [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x00 0x00]
  Pincap 0x0001003c: IN OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x90170110: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, 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: 3
     0x0c 0x0d 0x0e*

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

Raymond (superquad-vortex2) wrote :

which node is the headset ?

try hda-jack-sense-test

as Mic Jack is designed for supporting 5.1 external speakers by retasking, two headphone jacks seem support surround 4.0

control.17 {
  iface CARD
  name 'Headphone Front Jack'
  value true
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
 control.18 {
  iface CARD
  name 'Headphone Surround Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }

Node 0x15 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Headphone Front Jack", index=0, device=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x80 0x80]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x0321101f: [Jack] HP Out at Ext Left
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 3
     0x0c* 0x0d 0x0e
Node 0x16 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=1, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Headphone Surround Jack", index=0, device=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x80 0x80]
  Pincap 0x0000001c: OUT HP Detect
  Pin Default 0x03211020: [Jack] HP Out at Ext Left
    Conn = 1/8, Color = Black
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=02, enabled=1
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 3
     0x0c 0x0d* 0x0e

The laptop has only one set of internal Left-Right speakers.

Here's the output for hda_jack_sense_test:

# First headphone jack plugged in (the one that sits closer to the front of the laptop).

Pin 0x15 (Black HP Out): present = Yes
Pin 0x16 (Black HP Out): present = No
Pin 0x19 (Black Mic): present = No

# Second headphone jack plugged in.

Pin 0x15 (Black HP Out): present = No
Pin 0x16 (Black HP Out): present = Yes
Pin 0x19 (Black Mic): present = No

# No headphones plugged.

Pin 0x15 (Black HP Out): present = No
Pin 0x16 (Black HP Out): present = No
Pin 0x19 (Black Mic): present = No

Raymond (superquad-vortex2) wrote :

do you mean that it has no internal subwoofer ?

which headphone jack support headset ?

(2x) Audio Out 1/8" Ports (One compatible with inline mic headset)
(1x) Line In Microphone 1/8" Port (retaskable for 5.1 analog audio output)

do it has a headset icon and a headphome icon near the jacks ?

do the headset mic work as expected ?

My bad, it does also have an internal subwoofer. Sorry.

The headset supporting jack is this one (it is marked with the icon you mention): Pin 0x15 (Black HP Out): present = Yes

Unfortunately I don't have a headset with inline mic available to test. FWIW the microphone jack does work as intended.

At last but not least, I checked the sources for which the driver got built, and yes, it seems I don't have those changes. I'll try to get them tested and see if the issue gets solved. Will keep you posted.

Raymond (superquad-vortex2) wrote :

autoconfig: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
   speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
   hp_outs=2 (0x15/0x16/0x0/0x0/0x0)
   mono: mono_out=0x0
   inputs:
     Internal Mic=0x12
     Mic=0x19

you still need to find out the node for the headset mic and the subwoofer

the problem is only three volume controls but two headphones , speaker and subwoofer , (front, rear, center/lfe)

summary: - Speaker sound output is mono until a headphone jack is plugged
+ Dell Alienware 14, Speaker sound output is mono until a headphone jack
+ is plugged

Hello,

Could you provide some guidance so I could find out those nodes for you?

On a related note I haven't tried the latest drivers yet, but I will soon and post any relevant information here.

Raymond (superquad-vortex2) wrote :

http://voices.canonical.com/david.henningsson/2011/11/29/turn-your-mic-jack-into-a-headphone-jack/

try hdajackretask to change one of the remain unconnected pin complexes which pincap support out for the missing speaker using advanced override option

Thanks for the pointer,

The pin for the subwoofer is 0x1a. Attached is a screenshot with the seetings I used for the override.

With this the subwoofer works fine and the alsamixer control "Bass Speaker" allows toggling it. But I still need to plug the headset on the jack to get stereo.

I'll get myself a headset with inline mic to discover the last pin.

Raymond (superquad-vortex2) wrote :

do the subwoofer need both left and right channel ?

try hda-analyer to change the volume sliders of audio mixer which is connected to subwoofet (node 0x0d ?)

speaker-test -c2 -t wave -D hw:0,0

do it work with 2.1 mode ?

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1286021

Raymond (superquad-vortex2) wrote :

you have to post the output of alsa-info,sh and pactl list

before you plugged headphone (speaker not working) and after you plugged headphone (speaker working)

FWIW I'm not using pulseaudio, so no pactl here.

2.1 works fine since the discovery of the subwoofer pin.

Attached are the requested alsa-info.sh outputs.

Not sure about what you mean if the subwoofer needs both left and right channel:

If it's that if I could use the subwoofer alone without the speakers, that's doable, it's just a matter of muting "Speaker" and leave "Bass Speaker" on, and then I have output just from the subwoofer.

If it's that if I can control left and right channels for the subwoofer itself, I can, using the hda_analyzer at the node 0x1a, under the output amplifier group "Val[0]" seems to mute a half of the subwoofer and "Val[1]" mutes the other, seriously I don't know how that happens, I always assumed the subwoofer to be a single speaker, but there it is.

As an additional note, the subwoofer is tied up to the Audio Mixer at node 0x0e (Attached hda_analyzer screenshot as well for it), muting "Val[0]" mutes all left output (as in Speakers, Subwoofer) and "Val[1]" does the same but with the right channel.

Thanks again.

Raymond (superquad-vortex2) wrote :

.092201] input: HDA Intel PCH Headphone Surround as /devices/pci0000:00/0000:00:1b.0/sound/card0/input19
[152768.092392] input: HDA Intel PCH Headphone Front as /devices/pci0000:00/0000:00:1b.0/sound/card0/input18
[152768.092619] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input17
[152890.220402] hda-codec: reconfiguring
[152891.270534] hda-codec: out of range cmd 0:20:400:ffff7fff

seem you are using dynamic reconfiguration instead of early patching

did you use "apply now" only instead of "install boot override" to create the firmware file to fix up the pin ?

speaker and subwoofer have their own volume controls and two headphone share the volume control

Raymond (superquad-vortex2) wrote :

Default Association and Sequence are used together by software to group Pin Complexes (and therefore jacks) together into functional blocks to support multichannel operation. Software may assume that all jacks with the same association number are intended to be grouped together, for instance to provide six channel analog output. The Default Association can also be used by software to prioritize resource allocation in constrained situations. Lower Default Association values would be higher in priority for resources such as processing nodes or Input and Output Converters.

Raymond (superquad-vortex2) wrote :

Sequence indicates the order of the jacks in the association group. The lowest numbered jack in the association group should be assigned the lowest numbered channels in the stream, etc. The numbers need not be sequential within the group, only the order matters. Sequence numbers within a set of Default Associations must be unique.

Raymond (superquad-vortex2) wrote :
Launchpad Janitor (janitor) wrote :

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

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Raymond (superquad-vortex2) wrote :

http://voices.canonical.com/david.henningsson/2014/03/07/headset-jacks-on-newer-laptops/

the most reliable source is to actually look at the small icon present next to the jack. Does it look like a headphone (without mic), headset (with mic) or a microphon

http://bazaar.launchpad.net/~unity-settings-daemon-team/unity-settings-daemon/trunk/view/head:/plugins/media-keys/what-did-you-plug-in/pa-backend.c

In PulseAudio ports will show up with the following names:
   Headphones - analog-output-headphones
   Headset mic - analog-input-microphone-headset
   Jack in mic-in mode - analog-input-microphone

   However, since regular mics also show up as analog-input-microphone,
   we need to check for certain controls on alsa mixer level too, to know
   if we deal with a separate mic jack, or a multi-function jack with a
   mic-in mode (also called "headphone mic").
   We check for the following names:

   Headphone Mic Jack - indicates headphone and mic-in mode share the same jack,
     i e, not two separate jacks. Hardware cannot distinguish between a
     headphone and a mic.
   Headset Mic Phantom Jack - indicates headset jack where hardware can not
     distinguish between headphones and headsets
   Headset Mic Jack - indicates headset jack where hardware can distinguish
     between headphones and headsets. There is no use popping up a dialog in
     this case, unless we already need to do this for the mic-in mode.
*/

you may need to file upstream bug report

since there should be either headset Mic Jack or headset Mic phantom Jack for you to use the headset mic

control.17 {
  iface CARD
  name 'Headphone Front Jack'
  value true
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
 control.18 {
  iface CARD
  name 'Headphone Surround Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }

Pietro (p-punk) wrote :

Hello i think i have the same issue since i have the same system Alienware 14 with ALC668 driver on Ubuntu Trusty Tahr 14.04

let you the alsa-info i hope it's enough information i have tried hdajackretask and it's a good tool but the problem remains

Thank you.

Raymond (superquad-vortex2) wrote :

you have not set node 0x1a to speaker in /sys/class/sound/hwC1D0/user_pin_configs:

/sys/class/sound/hwC1D0/init_pin_configs:
0x12 0x99a30140
0x14 0x90170110
0x15 0x0321101f
0x16 0x03211020
0x18 0x40030008
0x19 0x03a11030
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x41000001
0x1e 0x411111f0
0x1f 0x411111f0

/sys/class/sound/hwC1D0/driver_pin_configs:

/sys/class/sound/hwC1D0/user_pin_configs:
0x12 0x99a30140
0x14 0x90170110
0x15 0x0321101f
0x16 0x03211020
0x18 0x40030008
0x19 0x03a11030
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x41000001
0x1e 0x411111f0
0x1f 0x411111f0

Raymond (superquad-vortex2) wrote :

do suvpbwoofer really work since both speaker and subwoofer connect to same audio output ?

to add volume controls to speaker and subwoofer ,

either use hda Jack retask to remove one headphone jack

or

modify driver to increase badness when there are two headphone Jacks and two speaker pins ,but only three audio output when cfg->line_out_type == auto_pin_hp_out since Def assoc of second headphone Jack is larger than that of subwoofer (lower priority to assign volume control/audio output )

this force driver to assign audio output/volume control to two speakers first

Cesar (cesarp) wrote :

Hi, I have the same laptop, operating system, and the same problem, too.

Please let me know how can I be of help.

Thanks.

Cesar (cesarp) wrote :

Now all of a sudden no sound from speakers, only from headphones...

Pietro (p-punk) wrote :

Hey Thank you so much to everybody, specially Raymond (superquad-vortex2) for pointing to node 0x1a, work like a charm installing hdajackretask, chosing Realtek ALC668, marking show unconnected pins and, find Pin ID 0x1a mark override, choose line out (center/LFE) and apply now and that's it enjoy the great sound of Alienware 14, i hope this work for others, sorry for my terrible english.

Cesar (cesarp) wrote :

Yes, it works!

Things look a little bit different in alsamixer, though. Now instead of 'Enabled' it displays 'Line Out' in the auto-mute feature, but the functionality remains intact. Also 'Speaker' is set to 0 and cannot be changed. I'm attaching a screenshot as reference.

I haven't seen any other unwanted effects from the override. I'm able to adjust the volume using the fn keys and from the sound settings, as always. Will report back if I find something else.

Thanks for your help guys.

Raymond (superquad-vortex2) wrote :

reatasking subwoofer as line out is a trick which force the driver share volume control with speaker

the drawback is missing volume control of the subwoofer but you have volume controls for your headset and headphone

Raymond (superquad-vortex2) wrote :

#define assoc_of_nid(c,p) get_defcfg_association(snd_hda_codec_get_pincfg(c,p))

     if ((cfg->speaker_outs == 2) && (cfg->hp_outs == 2))
          if (cfg->line_out_type == AUTO_PIN_HP_OUT)
              for(i=0; i<2; i++)
                   if (assoc_of_nid(codec,cfg->line_out_pins[i]) > assoc_of_nid(codec,cfg->speaker_pins[i]))
                            badness++;

add the above in fill_and_eval_dacs() in hda_generic.c after

  if ( spec->mixer_nid) {

  }

this increase badness of cfg->line_out_type == AUTO_PIN_HP_OUT by one when the second headphone have higher def association than subwoofer , driver create speaker and bass speaker volume controls and headphone volume control for headset and headphone

Guy (guy-b) wrote :

Hi,

I did the instructions in #30 (Pietro) but I had to choose the option "install boot override" with "apply now" the device was allways occupied.
Anyway, now it showing the same in alsamixer as #31 (cesar) but to get the subwoofer working I have to plug the headphones into one of the two (headphone or headset) connectors. As soon as I remove them I loose the subwoofer !

What I'm doing wrong ?

I'm on Ubuntu server + xfce4 with his mixer (alsa) which shows also a setting switches > "speaker" that enable/disable de front speaker.

Thank you for any help.

Guy (guy-b) wrote :
Guy (guy-b) wrote :
Guy (guy-b) wrote :

Nobody to help ? Could someone confirme that you don't need to plug the headphones to get the subwoofer working ? Here is what I have in syslog concerning the hda-intel :

01-14 03:44 kernel: [ 5.318176] hda-intel 0000:00:03.0: Applying patch firmware 'hda-jack-retask.fw'
01-14 03:44 kernel: [ 5.318333] hda-intel 0000:00:1b.0: Applying patch firmware 'hda-jack-retask.fw'
01-14 03:44 kernel: [ 5.319998] HDA driver get symbol successfully from i915 module
01-14 03:44 kernel: [ 5.320025] snd_hda_intel 0000:00:1b.0: irq 47 for MSI/MSI-X
01-14 03:44 kernel: [ 5.327609] snd_hda_intel 0000:00:03.0: irq 48 for MSI/MSI-X
01-14 03:44 kernel: [ 5.330441] SKU: Nid=0x1d sku_cfg=0x41000001
01-14 03:44 kernel: [ 5.330443] SKU: port_connectivity=0x1
01-14 03:44 kernel: [ 5.330444] SKU: enable_pcbeep=0x0
01-14 03:44 kernel: [ 5.330445] SKU: check_sum=0x00000000
01-14 03:44 kernel: [ 5.330445] SKU: customization=0x00000000
01-14 03:44 kernel: [ 5.330446] SKU: external_amp=0x0
01-14 03:44 kernel: [ 5.330447] SKU: platform_type=0x0
01-14 03:44 kernel: [ 5.330448] SKU: swap=0x0
01-14 03:44 kernel: [ 5.330448] SKU: override=0x1
01-14 03:44 kernel: [ 5.330717] autoconfig: line_outs=1 (0x1a/0x0/0x0/0x0/0x0) type:line
01-14 03:44 kernel: [ 5.330718] speaker_outs=1 (0x14/0x0/0x0/0x0/0x0)
01-14 03:44 kernel: [ 5.330720] hp_outs=2 (0x15/0x16/0x0/0x0/0x0)
01-14 03:44 kernel: [ 5.330720] mono: mono_out=0x0
01-14 03:44 kernel: [ 5.330721] inputs:
01-14 03:44 kernel: [ 5.330723] Mic=0x19
01-14 03:44 kernel: [ 5.330724] Internal Mic=0x12
01-14 03:44 kernel: [ 5.330725] realtek: No valid SSID, checking pincfg 0x41000001 for NID 0x1d
01-14 03:44 kernel: [ 5.330726] realtek: Enabling init ASM_ID=0x0001 CODEC_ID=10ec0668
01-14 03:44 kernel: [ 5.336462] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card1/input12
01-14 03:44 kernel: [ 5.336517] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card1/input11
01-14 03:44 kernel: [ 5.336563] input: HDA Intel PCH Speaker as /devices/pci0000:00/0000:00:1b.0/sound/card1/input10
01-14 03:44 kernel: [ 5.336612] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card1/input9
01-14 03:44 kernel: [ 5.336661] init: failsafe main process (810) killed by TERM signal
01-14 03:44 kernel: [ 5.340994] input: HDA Intel HDMI HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.0/sound/card0/input15
01-14 03:44 kernel: [ 5.341064] input: HDA Intel HDMI HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.0/sound/card0/input14
01-14 03:44 kernel: [ 5.341113] input: HDA Intel HDMI HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.0/sound/card0/input13

Thank you.

Guy (guy-b) wrote :

Anybody out there ?

Guy (guy-b) wrote :

I install buntu 14.04.2 and pulseaudio (before only alsa) but it's still the same, need to plug the headphones to get the "subwoofer" working. With pulse is even a bigger mess, which where what..!

uname -r
3.13.0-46-generic

cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version k3.13.0-46-generic.

 cat /proc/asound/cards
 0 [HDMI ]: HDA-Intel - HDA Intel HDMI
                      HDA Intel HDMI at 0xd2710000 irq 47
 1 [PCH ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xd2714000 irq 48

Alienware... A real human crap !

Guy (guy-b) wrote :

Finally finally finally I got that salad to work but not the same way, here the details :

In fact they are to pins disconnected that I had to connect, the 0x1a and THE 0x18, the connections in hdajackretask are now :

0x1a = Line out (back)
0x18 = (Center/LFE)

Which gives in alsamixer :

Master = Master fonction.
Headphone (Headphone) = Adjustable volume for the headphone jack (first one).
Headphone (Headphone 1) = [00] Not adjustable (probably the headset jack ?).
Speaker (Speaker) = [00] Not adjustable.
Front (Front) = Adjustable and corresponding to front speakers (if on 00 you ear only the subwoofer).
Surround (Surround) = seems to correspond to the subwoofer (if on 00 you ear high front frequency).
Mic (Mic) = Mic adjustable.
Mic Boost (Mic Boost) = Adjustable but no idee what for.
Auto-Mute (Auto-mute Mode) > (line out, speaker, disable) = If line out selected it mute all speakers, if speaker selected it mute only the "tweeters" but the subwoofer is still active.

So I hope that it will be usefull to others that were fyghting to get that "crap" working.

P.S. I didn't try if the headset nor mic are fonctionnal but the headphone are, no problem.

Raymond (superquad-vortex2) wrote :
Download full text (3.9 KiB)

autoconfig for ALC3661: line_outs=2 (0x14/0x18/0x0/0x0/0x0) type:speaker speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) hp_outs=2 (0x15/0x16/0x0/0x0/0x0) mono: mono_out=0x0 inputs: Mic=0x19 Internal Mic=0x12

==> lo_type=2, wired=1, mio=1, badness=0x20
 multi_outs = 15/16/0/0 : 2/3/0/0 (type HP)
 out path: depth=3 '02:0c:15'
 out path: depth=3 '03:0d:16'
 spk_outs = 14/18/0/0 : 4/4/0/0
 spk path: depth=3 '04:0e:14'
 spk path: depth=3 '04:0e:18'
==> lo_type=2, wired=1, mio=0, badness=0x20
 multi_outs = 15/16/0/0 : 2/3/0/0 (type HP)
 out path: depth=3 '02:0c:15'
 out path: depth=3 '03:0d:16'
 spk_outs = 14/18/0/0 : 4/4/0/0
 spk path: depth=3 '04:0e:14'
 spk path: depth=3 '04:0e:18'
==> lo_type=2, wired=0, mio=1, badness=0x20
 multi_outs = 15/16/0/0 : 2/3/0/0 (type HP)
 out path: depth=3 '02:0c:15'
 out path: depth=3 '03:0d:16'
 spk_outs = 14/18/0/0 : 4/4/0/0
 spk path: depth=3 '04:0e:14'
 spk path: depth=3 '04:0e:18'
==> lo_type=2, wired=0, mio=0, badness=0x20
 multi_outs = 15/16/0/0 : 2/3/0/0 (type HP)
 out path: depth=3 '02:0c:15'
 out path: depth=3 '03:0d:16'
 spk_outs = 14/18/0/0 : 4/4/0/0
 spk path: depth=3 '04:0e:14'
 spk path: depth=3 '04:0e:18'
==> lo_type=1, wired=1, mio=1, badness=0x20
 multi_outs = 14/18/0/0 : 2/3/0/0 (type SP)
 out path: depth=3 '02:0c:14'
 out path: depth=3 '03:0d:18'
 hp_outs = 15/16/0/0 : 4/4/0/0
 hp path: depth=3 '04:0e:15' hp path: depth=3 '04:0e:16'
==> lo_type=1, wired=1, mio=0, badness=0x20
 multi_outs = 14/18/0/0 : 2/3/0/0 (type SP)
 out path: depth=3 '02:0c:14'
 out path: depth=3 '03:0d:18'
 hp_outs = 15/16/0/0 : 4/4/0/0
 hp path: depth=3 '04:0e:15'
 hp path: depth=3 '04:0e:16'
==> lo_type=1, wired=0, mio=1, badness=0x20
 multi_outs = 14/18/0/0 : 2/3/0/0 (type SP)
 out path: depth=3 '02:0c:14'
 out path: depth=3 '03:0d:18'
 hp_outs = 15/16/0/0 : 4/4/0/0
 hp path: depth=3 '04:0e:15'
 hp path: depth=3 '04:0e:16'
==> lo_type=1, wired=0, mio=0, badness=0x20
 multi_outs = 14/18/0/0 : 2/3/0/0 (type SP)
 out path: depth=3 '02:0c:14'
 out path: depth=3 '03:0d:18'
 hp_outs = 15/16/0/0 : 4/4/0/0
 hp path: depth=3 '04:0e:15'
 hp path: depth=3 '04:0e:16'
==> restoring best_cfg
==> Best config: lo_type=2, wired=1, mio=1
 multi_outs = 15/16/0/0 : 2/3/0/0 (type HP)
 out path: depth=3 '02:0c:15'
 out path: depth=3 '03:0d:16'
 spk_outs = 14/18/0/0 : 4/4/0/0
 spk path: depth=3 '04:0e:14'
 spk path: depth=3 '04:0e:18'

this is not best config since assign speaker and subwoofer to same DAC mean no spearate volume control for subwoofer and you need those config (type SP) which DACs are assigned to speaker and subwoofer

the easy way is to change the headset as [N/A] by hdajackretask

or

change badness of those config (type SP)

CTRL: add: Headphone Playback Volume:0
CTRL: add: Headphone Playback Switch:0
CTRL: add: Headphone Playback Volume:1
CTRL: add: Headphone Playback Switch:1
CTRL: add: Speaker Playback Volume:0
CTRL: add: Speaker Playback Switch:0
CTRL: add: Bass Speaker Playback Switch:0
CTRL: add: Mic Playback Volume:0
CTRL: add: Mic Playback Switch:0
CTRL: add: Auto-Mute Mode:0
CTRL: add: Capture Volume:0
CTRL: add: Capture Switch:0
CTRL: add: Mic Boost Volume:0
CTRL: add: Master Playback Volume:0 ...

Read more...

Guy (guy-b) wrote :

Hi Raymond,

Thanks to answer, I was fighting to get that "crap ~ sounding"... So it means my hdajackretask setup is not gut ? But I have a separed volume control for subwoofer !

Now it looks like that :

autoconfig: line_outs=2 (0x18/0x1a/0x0/0x0/0x0) type:line
speaker_outs=1 (0x14/0x0/0x0/0x0/0x0)
hp_outs=2 (0x15/0x16/0x0/0x0/0x0)
mono: mono_out=0x0
inputs:
Mic=0x19
Internal Mic=0x12

So you say *the easy way is to change the headset as [N/A] by hdajackretask*, but how to do that, I even don't see any headset in hdajackretask !? Which pin is it ? And where to change that badness stuff, which file where ?

To be clear, could you explain "simply" how to setup that (el cheapo) alien soup ?

P.S. I use only alsa, the card is reconised as ALC668 not ALC3661. I fondamentaly still don't know why the way from #30 don't work by me ?

Raymond (superquad-vortex2) wrote :

you are using old version of alsa driver if you still find the name is alc668 since the driver had rename alc668 on those dell computers to alc3661

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=4b016931a997be59a2be0da3398985a19fdfa5be

static struct alc_codec_rename_pci_table rename_pci_tbl[] = {
+ { 0x10ec0280, 0x1028, 0, "ALC3220" },
+ { 0x10ec0282, 0x1028, 0, "ALC3221" },
+ { 0x10ec0283, 0x1028, 0, "ALC3223" },
+ { 0x10ec0292, 0x1028, 0, "ALC3226" },
+ { 0x10ec0255, 0x1028, 0, "ALC3234" },
+ { 0x10ec0668, 0x1028, 0, "ALC3661" },
+ { } /* terminator */
+};

Raymond (superquad-vortex2) wrote :

for external 5.1

==> lo_type=2, wired=0, mio=1, badness=0x20
  multi_outs = 15/16/0/0 : 2/3/4/0 (type HP)
  out path: depth=3 '02:0c:15'
  out path: depth=3 '03:0d:16'

mio = 19/0 : 4/0
   mio path: depth=3 '04:0e:19'

driver need to add mio path for mic and treat two hp at same location to support 5.1

  spk_outs = 14/18/0/0 : 2/3/0/0
  spk path: depth=3 '02:0e:14'
  spk path: depth=3 '03:0e:18'

Raymond (superquad-vortex2) wrote :

Finally finally finally I got that salad to work but not the same way, here the details :

In fact they are to pins disconnected that I had to connect, the 0x1a and THE 0x18, the connections in hdajackretask are now :

0x1a = Line out (back)

but you have no line out jack

 do you get same result when running

hda-jack-sense-test -a

https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1302090/comments/4

Raymond (superquad-vortex2) wrote :

can you verify mic jack is at node 0x19 by hda-jack-sense-test ?

if yes, still missing node for headset mic

Guy (guy-b) wrote :

The diff concerns 1 file which add more aliases name but when I look to your autoconfig, it doesn't look better then mine, it's only cosmetic, the problem remain the same.

Now I desabled the headset and here is the result :

autoconfig: line_outs=2 (0x18/0x1a/0x0/0x0/0x0) type:line
speaker_outs=1 (0x14/0x0/0x0/0x0/0x0)
hp_outs=1 (0x15/0x0/0x0/0x0/0x0)
mono: mono_out=0x0
inputs:
Mic=0x19
Internal Mic=0x12

How to change the badness ?

Guy (guy-b) wrote :

hda-jack-sense-test -a
hda-jack-sense-test : commande introuvable

To which package belongs hda-jack-sense-test -a ?

Raymond (superquad-vortex2) wrote :

autoconfig: line_outs=2 (0x18/0x1a/0x0/0x0/0x0) type:line
 speaker_outs=1 (0x14/0x0/0x0/0x0/0x0)
 hp_outs=2 (0x15/0x16/0x0/0x0/0x0)
 mono: mono_out=0x0
 inputs:
 Mic=0x19
 Internal Mic=0x12

 this won't create correct name for the volume control for the subwoofer , driver assign front playback volume to node 0x18, surround playback volume to 0x1a (fake line out)

only one DAC for the remaining headphones and speaker

did both left and right channel affect the subwoofer ?

Guy (guy-b) wrote :

Raymond, I see that you perfectly manage the alsa driver/soup, I don't. Wouldn't it be simplier to tell me which setup do I have to configure in hdajackretask (or elsewhere) to make that crap cheap chip working properly ? And you could contact alsa to fix that stincky driver once for all. Whah you think about ?

Raymond (superquad-vortex2) wrote :

how did you set the pin default of subwoofer ?

  Pin Default 0x90170111: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x1
 Misc = NO_PRESENCE

  subwoofer may use same DAC if there is low pass filter,

did your hear sound from speaker and subwoofet ?

spk_outs = 14/18/0/0 : 4/4/0/0
  spk path: depth=3 '04:0e:14'
  spk path: depth=3 '04:0e:18'

you need four channels and software low pass filter only when there is no hardware low pass filter

multi_outs = 14/18/0/0 : 2/3/0/0 (type SP)
  out path: depth=3 '02:0c:14'
  out path: depth=3 '03:0d:18'

Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=73bdd597823e2231dc882577dbbaf8df92fe1775

for dell laptop with combo jack which use 0x1b for headset mic

which is similar to your configuration without headhone jack and mic jack

+ [ALC668_FIXUP_DELL_MIC_NO_PRESENCE] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
+ { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
+ { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
+ { }
+ },
+ .chained = true,
+ .chain_id = ALC668_FIXUP_HEADSET_MODE
+ },

Raymond (superquad-vortex2) wrote :

refer to #38

node 0x1a seem to be the subwoofer

Pin-ctls: 0x40: OUT VREF_HIZ

 but you retask it as line out

Node 0x18 [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals: [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x80 0x80]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x40030008: [N/A] Line Out at Ext N/A
    Conn = ATAPI, Color = Unknown
    DefAssociation = 0x0, Sequence = 0x8
  Pin-ctls: 0x20: IN VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 3
     0x0c* 0x0d 0x0e

Node 0x1a [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Control: name="PCM Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Speaker Jack", index=0, device=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals: [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x00 0x00]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT VREF_HIZ
  Unsolicited: tag=03, enabled=1
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 3
     0x0c* 0x0d 0x0e

Raymond (superquad-vortex2) wrote :

to test the headset mic which need

1) assign specific sequence number to pin default

2) put the following hint in hdajackretask option
since you have headset mic and another mic jack

[hint]
parser_flags=4

Guy (guy-b) wrote :

Thanks Raymond,

By default the pin 0x1a if I remerber well, was not connected at all. I found out that the 0x12 (internal mic) was (override) connected by default but if I disconnect it, it seems to solution the problem of the mono sounding front speakers and makes now the front speakers output to stereo.

Now I have done that much around that stincky crapy el cheapo cheap (laptop) that I don't remerber even what exactly.

Anyway, now my setup looks like this and I have the subwoofer and front speakers working and it looks like this :

autoconfig: line_outs=2 (0x18/0x1a/0x0/0x0/0x0) type:line
speaker_outs=1 (0x14/0x0/0x0/0x0/0x0)
hp_outs=1 (0x16/0x0/0x0/0x0/0x0)
mono: mono_out=0x0
inputs:
Mic=0x19
Internal Mic=0x12

The hdajackretask setup :

Pins :

0x12 : Not override > Internal mic
0x14 : Override > Internal speaker
0x15 : Override > Not connected
0x16 : Not override > Headphone
0x18 : Override > Line out (front)
0x1a : = Overrride > Line out (Center/LFE)

In alsamixer I have no trace of an bass speaker but does control :

Master : Only one channel control
Speaker : Set to 00 and no control over
Front : Two channels (R/L) separed controls
Surround : Two channels (R/L) separed controls

Raymond (superquad-vortex2) wrote :

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

the introduction of snd_hda_pin_quirk automatically fix some pin default based on the bios pin defaults

not sure those quirks have any impact when you perform some test since those quirk perform fixup silently without any message on system log

the bass speaker playback volume only appear when there are two speaker pin complex and DAC assign to speaker first instead of headphone,

i.e. either two headphone jacks share same DAC

or

need to implement "Speaker+HP" playback volume as the driver try to avoid this kind of sharing volume control

Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_auto_parser.c?id=20531415adf30877296ea89fb0e534ac87f6cc71

thosr quirks are mainly used by Dell notebook with one combo jack which support headset, hp and mic

Raymond (superquad-vortex2) wrote :

https://bugzilla.kernel.org/enter_bug.cgi?product=Drivers

you should file bug upstream

1) Post output of alsa-info.sh without any patch and state the problem of the config

2) post output of alsa-info.sh after patch one of those missing pin complex at a time and state the pros and cons of that config

subwoofer, headset mic

Guy (guy-b) wrote :

1) When you say without any patch means without any change through hdajackretask ?

2) With connecting the pins through hdajackretask ?

Anyway, the first question that would be good to solve is to know how many loudspeakers are effectively in that box because I don't realy understand what front and surround speakers are in this situation. As far as I know they are 3 : R/L front speakers and the subwoofer. So where is that "surround" coming from in alsa ?

I will try to find a schemes of that setup to know exactly how is that box configured.

Raymond (superquad-vortex2) wrote :

http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-March/023470.html

you need software lfe filter if there is no hardware low pass filter

Guy (guy-b) wrote :

I'm using only alsa not pulseaudio.

Raymond (superquad-vortex2) wrote :

did you hear sound from subwoofer for both left and right channel , or only from one channel

speaker-test -c2 -t wav -D hw:0,0

speaker-test -c4 -t wav -D hw:0,0

do you hear only low frequency from the subwoofer ?

alc668 does not have any mono pin complex nor mono audio mixer for downmixing

Guy (guy-b) wrote :

Subwoofer with two channels ? Anyway, I hear probably from both channels because the front speakers have left/right and (the supposed subwoofer) surround speaker has left/right to. I definetly don't know how many speakers/ways are in that box, as far as know, two front and the subwoofer...

I'm currently on my desktop but I will test as soon as possible, to be sure and post the results.

Guy (guy-b) wrote :

I did the speakers tests and the results are the following :

speaker-test -c2 -t wav -D hw:1,0

speaker-test 1.0.27.2

Le périphérique de lecture est hw:1,0
Les paramètres du flux sont 48000Hz, S16_LE, 2 canaux
fichier(s) WAV
La fréquence est 48000Hz (demandée 48000Hz)
L'intervalle de la taille du tampon est de 64 à 16384
L'intervalle de la taille de la période est de 32 à 8192
Taille max. de tampon 16384 utilisée
Périodes = 4
La durée de la période à été définie= 4096
La taille du tampon à été définie = 16384
 0 - Avant Gauche
 1 - Avant Droit
Temps par période = 2.731341
 0 - Avant Gauche
 1 - Avant Droit

With this test I hear the front right/left channels playing together with the rear (subwoofer) right/left, not only the front speakers, one channel after the other.

Then :

speaker-test -c4 -t wav -D hw:1,0
speaker-test 1.0.27.2
Le périphérique de lecture est hw:1,0
Les paramètres du flux sont 48000Hz, S16_LE, 4 canaux
fichier(s) WAV
La fréquence est 48000Hz (demandée 48000Hz)
L'intervalle de la taille du tampon est de 32 à 8192
L'intervalle de la taille de la période est de 16 à 4096
Taille max. de tampon 8192 utilisée
Périodes = 4
La durée de la période à été définie= 2048
La taille du tampon à été définie = 8192
 0 - Avant Gauche
 1 - Avant Droit
 3 - Arrière Droit
 2 - Arrière Gauche
Temps par période = 5.717038
 0 - Avant Gauche
 1 - Avant Droit
 3 - Arrière Droit
 2 - Arrière Gauche

With this test I hear first the front left/right speakers and then the rear (subwoofer) right/left speakers. Here the front and rear are clearly dissociate.

But in both tests all speakers are fonctionnal.

Raymond (superquad-vortex2) wrote :

driver seem hardcode to use first pin spec->gen.autocfg.hp_pins[0] as hp of the headset

and imux_pin to determine the selected mic

this mean that if you set the correct pin default of headset mic (headset mic phantom jack)

you can select internal mic, headset mic or mic jack manually using the capture source control

static void alc_update_headset_mode(struct hda_codec *codec)
{
 struct alc_spec *spec = codec->spec;

 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]];
 hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];

 int new_headset_mode;

 if (!snd_hda_jack_detect(codec, hp_pin))
  new_headset_mode = ALC_HEADSET_MODE_UNPLUGGED;
 else if (mux_pin == spec->headset_mic_pin)
  new_headset_mode = ALC_HEADSET_MODE_HEADSET;
 else if (mux_pin == spec->headphone_mic_pin)
  new_headset_mode = ALC_HEADSET_MODE_MIC;
 else
  new_headset_mode = ALC_HEADSET_MODE_HEADPHONE;

Raymond (superquad-vortex2) wrote :

the presence of internal mic phantom , headset mic phantom and mic jack force the driver to disable auto mic selection and create the capture source control

Raymond (superquad-vortex2) wrote :

if headset mic is at node 0x1b similar to the model dell-headset-multi

[pin]
0x1b 0x03a1113c

[hint]
parser_flags=4

Guy (guy-b) wrote :

Hi,

Sorry to answer that late but my alienware died and has been replaced by an another machine.

Anyway, thanks a lot for your time and help Raymond.

https://bugzilla.kernel.org/show_bug.cgi?id=117781

Please refer to the following patch

https://bugzilla.kernel.org/show_bug.cgi?id=117781

should be ok now, not tested.

any update on this sound issue?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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