[HP Compaq Pro 4300 SFF PC, Realtek ID 221, Green Line Out, Rear] Pulseaudio fails to detect card

Bug #1251127 reported by C Schilder
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PulseAudio
Unknown
Medium
pulseaudio (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

lsb_release -rd:
Description: Ubuntu Trusty Tahr (development branch)
Release: 14.04

apt-cache policy pkgname:
pulseaudio:
  Installed: 1:4.0-0ubuntu6
  Candidate: 1:4.0-0ubuntu6
  Version table:
 *** 1:4.0-0ubuntu6 0
        500 http://ftp.nluug.nl/os/Linux/distr/ubuntu/ trusty/main i386 Packages
        500 http://ftp.tudelft.nl/archive.ubuntu.com/ saucy/main i386 Packages
        100 /var/lib/dpkg/status
     1:3.0-0ubuntu6 0
        500 http://archive.ubuntu.com/ubuntu/ raring/main i386 Packages

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: pulseaudio 1:4.0-0ubuntu6
ProcVersionSignature: Ubuntu 3.12.0-2.7-generic 3.12.0
Uname: Linux 3.12.0-2-generic i686
ApportVersion: 2.12.6-0ubuntu1
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: cschilder 2392 F.... mixer_applet2
Date: Thu Nov 14 07:35:59 2013
InstallationDate: Installed on 2013-11-01 (12 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release i386 (20130424)
MarkForUpload: True
SourcePackage: pulseaudio
Symptom: audio
Symptom_Card: HDA-Intel - HDA Intel PCH
Symptom_Jack: Green Line Out, Rear
Title: [HP Compaq Pro 4300 SFF PC, Realtek ID 221, Green Line Out, Rear] Pulseaudio fails to detect card
UpgradeStatus: Upgraded to trusty on 2013-11-01 (12 days ago)
dmi.bios.date: 01/23/2013
dmi.bios.vendor: AMI
dmi.bios.version: 8.10
dmi.board.asset.tag: CZC3211FPH
dmi.board.name: 2ADE
dmi.board.vendor: Hewlett-Packard
dmi.board.version: 1.0
dmi.chassis.asset.tag: CZC3211FPH
dmi.chassis.type: 3
dmi.chassis.vendor: Hewlett-Packard
dmi.modalias: dmi:bvnAMI:bvr8.10:bd01/23/2013:svnHewlett-Packard:pnHPCompaqPro4300SFFPC:pvr:rvnHewlett-Packard:rn2ADE:rvr1.0:cvnHewlett-Packard:ct3:cvr:
dmi.product.name: HP Compaq Pro 4300 SFF PC
dmi.sys.vendor: Hewlett-Packard

Revision history for this message
In , tormen (quickhelp) wrote :

HP desktop pc with audio line-out / headphone jack in front and rear AND a built-in mono speaker.

Hardware: 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)

Debian wheezy stable system with pulseaudio 2.0-6.1

With alsa there is a ""Simple mixer control 'Independent HP'" if set to
  * "Enable", sound is /only/ audible through the built-in speaker
  * "Disable", sound is /only/ audible through the connected headphone/line-out

With pulseaudio (thanks a lot to poljar #pulseaudio IRC !):
 (1.) If I unplug any line-out audio cable aka headphone cables, then
      * pactl set-sink-port 0 analog-output-headphones
        Makes sound only be audible through the built-in internal mono speaker
      * pactl set-sink-port 0 analog-output-speaker
        Makes no sound audible (which seems to be exactly how it should be :)

 (2.) If I plug an headphone cable either rear or front, then:
      * pactl set-sink-port 0 analog-output-headphones
        Makes sound /only/ be audible through the plugged headphone/line-out
BUT:
      * pactl set-sink-port 0 analog-output-speaker
        Makes sound /only/ be audible through the plugged headphone/line-out TOO

<poljar> statement: that sounds wrong, analog-output-speaker should either tagged as not available if the hardware prevents it to output to the speaker while something is connected or it should work, so feel free to report a bug

I created for both cases (1.) and (2.) the pulseaudio-output and the client-output. I hope you find them useful. Please let me know if you need anything else.

The system is a headless server system.
pulseaudio is running as user pulse

To get the pulseaudio-output it ran like this (debian default with changed --log-target and added -vvvvvv):

/usr/bin/pulseaudio -vvvvvv --system --disallow-exit --daemonize --log-target=file:/tmp/pulseaudio.log --high-priority --disallow-module-loading=1

So unter pulse I did not find any way yet to use the built-in speaker for sound-output when I have a headphone/line-out plugged.
Even though under alsa I am able to toggle the output to come through the built-in speaker and with or without a headphone/line-out plugged!

This is bugging me, because I have my stereo plugged all the time to the system, but it ONLY gets turned on, when I need it. So important system notifications should be played through speaker.

Please help :)

Thanks a lot in advance !

Tormen.

Revision history for this message
In , tormen (quickhelp) wrote :

Created attachment 88110
(2.) Test with headphone/lineout plugged (in front) -- client-side + pulseaudio output

Revision history for this message
In , tormen (quickhelp) wrote :

Created attachment 88111
(1.) Test with no audio cables plugged -- client-side + pulseaudio output

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

post the output of alsa-info.sh

Revision history for this message
In , tormen (quickhelp) wrote :
Revision history for this message
In , Raymond (superquad-vortex2) wrote :

this seem to be Front Playback Volume and Switch instead of PCM Playback Volume and Switch

Node 0x12 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="PCM Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Line Out Jack", index=0, device=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x00 0x00]
  Pincap 0x0001001f: OUT HP EAPD Detect Trigger ImpSense
  EAPD 0x2: EAPD
  Pin Default 0x01014010: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Green
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=02, enabled=1
  Power states: D0 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x0a

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

Revision history for this message
In , Raymond (superquad-vortex2) wrote :
Revision history for this message
In , tormen (quickhelp) wrote :

Hi,

> do pulseaudio need to differentate desktop speaker from notebook speaker ?

Are you suggesting that pulseaudio would need to differentiate between desktop speaker and notebook speaker to work properly?

And is this question meant for me to answer ? - I am having this problem on a desktop PC. Otherwise unfortunately I would not know what to answer you.

Also I am not sure that I understand the implications of your Comment #5:
https://bugs.freedesktop.org/show_bug.cgi?id=70865#c5

So .... my system implements a "Front Playback Volume and Switch" instead of "PCM Playback Volume and Switch" and this is what breaks it for me ?

Did you come to a conclusion? Do you need more input?

Thanks a lot for your guidance!

Tormen

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

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

the headphone Jack and line out Jack detection control return the state of the the Jack (plugged or unplugged)

pulseaudio use headphone Jack kcontrol to mute speaker volume

http://cgit.freedesktop.org/pulseaudio/pulseaudio/plain/src/modules/alsa/mixer/paths/analog-output-headphones.conf

[Element Speaker]
switch = off
volume = off

it also use line out front Jack kcontrol to mute speaker

http://cgit.freedesktop.org/pulseaudio/pulseaudio/plain/src/modules/alsa/mixer/paths/analog-output-lineout.conf

[Element Speaker]
switch = mute
volume = off

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

As pulseaudio did not have any conf file to use "PCM Playback Switch"

better to name the playback switch to Front instead of PCM when the mute is at pin complex of Line Out

/* give some appropriate ctl name prefix for the given line out channel */
static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
        int *index, int ctl_type)
{
 struct hda_gen_spec *spec = codec->spec;
 struct auto_pin_cfg *cfg = &spec->autocfg;
+ struct nid_path *path;
+ hda_nid_t nid;
+
+ if (ctl_type == NID_PATH_MUTE_CTL) {
+ path = snd_hda_get_path_from_idx(codec, spec->out_paths[ch]);
+ nid = path->ctls[ctl_type] & 0x3f;
+ if (get_wcaps_type(get_wcaps(codec, nid)) == AC_WID_PIN)
+ return channel_name[ch];
+ }

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

Line Out has PCM playback switch is due to this patch

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_generic.c?id=247d85ee068610c50d66ee0cd3130e02c69f5f2e

volume is ok but mute switch is not shared by two outputs ( at least on hp dc5800)

 /* for a single channel output, we don't have to name the channel */
 if (cfg->line_outs == 1 && !spec->multi_ios)
- return "PCM";
+ return (ctl_type == NID_PATH_MUTE_CTL) ? channel_name[ch] : "PCM";

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

remove model=generic from /etc/modprobe.d/alsa-base.conf

!!Modprobe options (Sound related)
!!--------------------------------

snd_hda_intel: model=generic

High Definition Audio with Realtek ALC221 codec (all ports are stereo)
Microphone/Headphone front ports (standard)
Line-out and Line-In rear ports (standard)
Multi-streaming capable (standard) <------ add hint indep_hp =true
Internal Speaker (standard)
HP Thin USB Powered Speakers (optional)

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/Documentation/sound/alsa/HD-Audio.txt

autoconfig: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line
   speaker_outs=1 (0x17/0x0/0x0/0x0/0x0)
   hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
   mono: mono_out=0x0
   inputs:
     Mic=0x1a
     Line=0x19

Revision history for this message
Raymond (superquad-vortex2) wrote :
Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
Raymond (superquad-vortex2) wrote :

does switch-on-port-available switch to auto-null when both mic and line in jacks are not plugged

 control.17 {
  iface CARD
  name 'Mic Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
 control.18 {
  iface CARD
  name 'Line Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }

 control.19 {
  iface CARD
  name 'Line Out Jack'
  value true
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
 control.20 {
  iface CARD
  name 'Front Headphone Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
 control.21 {
  iface CARD
  name 'Speaker Phantom Jack'
  value true
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }

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

Multi-streaming capable (standard)

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

Multistreaming lets you listen to two different audio sources on two different speaker sets. For example, you can listen to one audio source through the back panel speakers and a second audio source through front panel headphones or speakers.

This mean front panel and rear panel should use different audio output 0x02 and 0x03

i.e. Line Out and Headphone should connect to different audio output

Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
  Control: name="PCM Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Line Out Jack", index=0, device=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x00 0x00]
  Pincap 0x00010014: OUT EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x01014020: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Green
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=02, enabled=1
  Connection: 2
     0x0c 0x0d*

Node 0x21 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Front Headphone 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 0x0221102f: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Black
    DefAssociation = 0x2, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Connection: 2
     0x0c 0x0d*

Node 0x02 [Audio Output] wcaps 0x1d: Stereo Amp-Out
  Control: name="Speaker Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals: [0x32 0x32]
  Converter: stream=8, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x03 [Audio Output] wcaps 0x1d: Stereo Amp-Out
  Control: name="PCM Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="ID 221 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals: [0x3b 0x3b]
  Converter: stream=8, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM

Changed in pulseaudio:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Raymond (superquad-vortex2) wrote :

With alsa there is a ""Simple mixer control 'Independent HP'" if set to
  * "Enable", sound is /only/ audible through the built-in speaker
  * "Disable", sound is /only/ audible through the connected headphone/line-out

as pulseaudio only use device 0 for analog playback,

when independent HP is on , HP is only used for alt analog device 2 (auto mute of speaker by headphone is disabled)

when independent HP is off, HP is used by analog device 0

if your external speaker is always plugged into line out,

do you mean you want the internal speaker only auto muted by headphone but not by line out ?

APLAY

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

Node 0x03 [Audio Output] wcaps 0x405: Stereo Amp-Out
  Control: name="Headphone Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="AD1884 Alt Analog", type="Audio", device=2
  Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x05, mute=0
  Amp-Out vals: [0x27 0x27]
  Converter: stream=0, channel=0
  Power states: D0 D3
  Power: setting=D0, actual=D0
Node 0x04 [Audio Output] wcaps 0x405: Stereo Amp-Out
  Control: name="PCM Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="AD1884 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x05, mute=0
  Amp-Out vals: [0x27 0x27]
  Converter: stream=0, channel=0
  Power states: D0 D3
  Power: setting=D0, actual=D0

Revision history for this message
In , Gitlab-migration (gitlab-migration) wrote :

-- GitLab Migration Automatic Message --

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

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

Changed in pulseaudio:
status: Confirmed → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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