You are not logged in.

#1 2014-04-12 02:13:38

neagix
Member
Registered: 2013-10-19
Posts: 14

Enabling headphone audio

Hi there

I have a probably common issue: snd-hda-intel supports my integrated hardware but I cannot get any sound from the headphones. Headphones are plugged in correct hole and this is my card's codec#0:

Codec: Realtek ALC892
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0892
Subsystem Id: 0x1849c892
Revision Id: 0x100302
No Modem Function Group found
Default PCM:
    rates [0x5f0]: 32000 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D1 D2 D3 CLKSTOP EPSS
  Power: setting=D0, actual=D0
GPIO: io=2, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Front Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="ALC892 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals:  [0x28 0x28]
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Surround Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals:  [0x28 0x28]
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x04 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Center Playback Volume", index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Control: name="LFE Playback Volume", index=0, device=0
    ControlAmp: chs=2, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals:  [0x28 0x28]
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x05 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Headphone Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals:  [0x28 0x28]
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x06 [Audio Output] wcaps 0x611: Stereo Digital
  Control: name="IEC958 Playback Con Mask", index=0, device=0
  Control: name="IEC958 Playback Pro Mask", index=0, device=0
  Control: name="IEC958 Playback Default", index=0, device=0
  Control: name="IEC958 Playback Switch", index=0, device=0
  Control: name="IEC958 Default PCM Playback Switch", index=0, device=0
  Device: name="ALC892 Digital", type="SPDIF", device=1
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x5f0]: 32000 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x07 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x08 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Control: name="Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Device: name="ALC892 Analog", type="Audio", device=0
  Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1
  Amp-In vals:  [0x1c 0x1c]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x23
Node 0x09 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Control: name="Capture Volume", index=1, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Capture Switch", index=1, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Device: name="ALC892 Alt Analog", type="Audio", device=2
  Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1
  Amp-In vals:  [0x80 0x80]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x22
Node 0x0a [Audio Input] wcaps 0x100711: Stereo Digital
  Converter: stream=0, channel=0
  SDI-Select: 0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x1f
Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Control: name="Front Mic Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=1, ofs=0
  Control: name="Front Mic Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=1, ofs=0
  Control: name="Rear Mic Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Rear Mic Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Line Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=2, ofs=0
  Control: name="Line Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=2, ofs=0
  Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x9b 0x9b] [0x9c 0x9c] [0x9c 0x9c] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Connection: 10
     0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17
Node 0x0c [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x00 0x00]
  Connection: 2
     0x02 0x0b
Node 0x0d [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x00 0x00]
  Connection: 2
     0x03 0x0b
Node 0x0e [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x00 0x00]
  Connection: 2
     0x04 0x0b
Node 0x0f [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x00 0x00]
  Connection: 2
     0x05 0x0b
Node 0x10 [Audio Output] wcaps 0x611: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x5f0]: 32000 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x11 [Pin Complex] wcaps 0x400781: Stereo Digital
  Pincap 0x00000010: OUT
  Pin Default 0x40000000: [N/A] Line Out at Ext N/A
    Conn = Unknown, Color = Unknown
    DefAssociation = 0x0, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x10
Node 0x12 [Pin Complex] wcaps 0x400401: Stereo
  Pincap 0x00000020: IN
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x13 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Front Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Line Out Front Jack", index=0, device=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0001003e: IN OUT HP EAPD Detect Trigger
  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=04, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x0c
Node 0x15 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Surround Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Line Out Surround Jack", index=0, device=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x00000036: IN OUT Detect Trigger
  Pin Default 0x01011012: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0x2
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=05, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x0d
Node 0x16 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Center Playback Switch", index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Control: name="LFE Playback Switch", index=0, device=0
    ControlAmp: chs=2, dir=Out, idx=0, ofs=0
  Control: name="Line Out CLFE Jack", index=0, device=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x00000036: IN OUT Detect Trigger
  Pin Default 0x01016011: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Orange
    DefAssociation = 0x1, Sequence = 0x1
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=06, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x0e
Node 0x17 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x00000036: IN OUT Detect Trigger
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x0f
Node 0x18 [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Control: name="Rear Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Rear Mic 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:  [0x80 0x80]
  Pincap 0x00003736: IN OUT Detect Trigger
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x01a19040: [Jack] Mic at Ext Rear
    Conn = 1/8, Color = Pink
    DefAssociation = 0x4, Sequence = 0x0
  Pin-ctls: 0x21: IN VREF_50
  Unsolicited: tag=02, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x19 [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Control: name="Front Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Front Mic Phantom Jack", index=0, device=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x02 0x02]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0000373e: IN OUT HP Detect Trigger
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x02a19150: [Jack] Mic at Ext Front
    Conn = 1/8, Color = Pink
    DefAssociation = 0x5, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1a [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Control: name="Line Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Line 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:  [0x80 0x80]
  Pincap 0x00003736: IN OUT Detect Trigger
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x0181304f: [Jack] Line In at Ext Rear
    Conn = 1/8, Color = Blue
    DefAssociation = 0x4, Sequence = 0xf
  Pin-ctls: 0x20: IN VREF_HIZ
  Unsolicited: tag=03, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1b [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Front Headphone Phantom 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 0x0001373e: IN OUT HP EAPD Detect Trigger
    Vref caps: HIZ 50 GRD 80 100
  EAPD 0x2: EAPD
  Pin Default 0x02214120: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Green
    DefAssociation = 0x2, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0xc0: OUT HP VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 5
     0x0c 0x0d 0x0e 0x0f* 0x26
Node 0x1c [Pin Complex] wcaps 0x400481: Stereo
  Pincap 0x00000024: IN Detect
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x1d [Pin Complex] wcaps 0x400400: Mono
  Pincap 0x00000020: IN
  Pin Default 0x4035e601: [N/A] CD at Ext N/A
    Conn = Optical, Color = White
    DefAssociation = 0x0, Sequence = 0x1
  Pin-ctls: 0x20: IN
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x1e [Pin Complex] wcaps 0x400781: Stereo Digital
  Control: name="SPDIF Phantom Jack", index=0, device=0
  Pincap 0x00000010: OUT
  Pin Default 0x01451130: [Jack] SPDIF Out at Ext Rear
    Conn = Optical, Color = Black
    DefAssociation = 0x3, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x06
Node 0x1f [Pin Complex] wcaps 0x400681: Stereo Digital
  Pincap 0x00000020: IN
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
  Processing caps: benign=0, ncoeff=24
Node 0x21 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Connection: 12
     0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b 0x12
Node 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Connection: 11
     0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b
Node 0x24 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x25 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals:  [0x40 0x40]
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x26 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x80 0x80]
  Connection: 2
     0x25 0x0b

I have tried using hda-verb, but does not work. Commands I tried are like:

hda-verb /dev/snd/hwC1D0 0x05 set_pin_wid 0xc0
hda-verb /dev/snd/hwC1D0 0x05 set_pin_wid 0x40
hda-verb /dev/snd/hwC1D0 0x0f SET_CONNECT_SEL 1

But all without effect. When setting the pin, it doesn't change anything thus I think I cannot set a pin for the headphones node.

Also I am looking at "Headphone Playback Switch" and wondering if that is exactly what I need, but can't figure out a way to trigger it (unless it's already being triggered automatically by alsamixer, although not visible there).

Has anyone better ideas? Thanks in advance!

Offline

#2 2014-04-12 10:14:35

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Enabling headphone audio

Use hdajackretask from alsa-tools package instead of manually using hda-verb. Do you want to get headphones on the front panel working or is this a laptop?

Offline

#3 2014-04-12 18:10:17

neagix
Member
Registered: 2013-10-19
Posts: 14

Re: Enabling headphone audio

emeres wrote:

Use hdajackretask from alsa-tools package instead of manually using hda-verb. Do you want to get headphones on the front panel working or is this a laptop?

Thanks for the tip, that seems like a nice utility. No laptop, I am trying to get the front panel working. It's an ASROCKS motherboard

In alsamixer I can see 2 cards, the Realtek ALC892 (motherboard) and the HDA Intel HDMI. The sound is going to my LCD through the HDA Intel HDMI, S/PDIF 2 and not through the Realtek ALC892 where the front panel is.

I am sure that sound is getting to the LCD through the Haswell because if I disable all volumes on the Realtek ALC892 it can be still heard.

Thus, I am afraid this is not possible without software in the middle (pulse?) that copies the audio stream? Unless pins can be tied across cards?

NOTE: microphone can be heard back in the headphones, but no sound played

Offline

#4 2014-04-12 19:40:11

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Enabling headphone audio

So how did you set up the default sound card device? Is Pulseaudio running all the time? What happens when you kill PA and run a speaker-test for the integrated card? My ALC982 copies the stream destined for front to headphone jack on the front panel out of the box, meaning the alsa driver takes care of that (I am not using PA at all).
For a manual alsa solution (if the speaker-test with default settings fails), you would need a little setup using some plugins to copy streams between cards. However PA should be also able to do this, look in its wiki.
As last resort even though autoprobe does a good job, you could try a different model for your module (ALC982 has mainly some for laptops, but similar codecs have 6stack). Or set up the headphones pin using hdajackretask.

Offline

#5 2014-04-13 10:01:47

neagix
Member
Registered: 2013-10-19
Posts: 14

Re: Enabling headphone audio

I am not using PA at all, and I am not willing to.

The problem is that stream is going through ALSA to card 0 (Intel HDA Haswell) while my headphone is on card 1.

You made me think that I am already using those plugins (dmix) in my .asoundrc!

    pcm.!default {
       type plug
       slave.pcm "dmixer"
    }

    pcm.dsp0 {
        type plug
        slave.pcm "dmixer"
    }

    pcm.dmixer  {
        type dmix
        ipc_key 1024
        slave {
          pcm "hw:0,8"
          period_time 0
          period_size 1024
          buffer_size 4096
          rate 48000
       }
       bindings {
          0 0
          1 1
       }
    }

    ctl.dmixer {
       type hw
       card 0
    }

So I guess I will have to instruct dmix to make a second stream copy to another hw card...I'll give it a try

Offline

#6 2014-04-13 10:25:28

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Enabling headphone audio

Using copy plugin as pcm.default and streaming to hdmi and headphones pcms should work.

Offline

#7 2014-04-13 10:41:04

neagix
Member
Registered: 2013-10-19
Posts: 14

Re: Enabling headphone audio

emeres wrote:

Using copy plugin as pcm.default and streaming to hdmi and headphones pcms should work.

Thanks, however I am a bit lost in this. Mostly because ALSA documentation does not say what is the "master" nor how to define it.

I have verified that my headphone is "hw:1,0" and my HDMI out (for sound) is "hw:0,8". So if I swap this in the pcm.dmixer I can actually route sound either to the LCD speakers or to my headphones.

However, even with my copy plugin definition below, I still do not get sound on both outputs.

ctl.!default {
	type hw           
	card 1
}

pcm.!default {
    type plug
    slave.pcm "dmixer"
}

pcm.dmixer  {
    type dmix
    ipc_key 1024
    slave {
         pcm "hw:0,8"
         period_time 0
         period_size 1024
         buffer_size 4096
         rate 48000
    }
    bindings {
       0 0
       1 1
    }
}

pcm.copyToRealTek  {
    type copy
    slave {
         pcm "hw:1,0"
         period_time 0
         period_size 1024
         buffer_size 4096
         rate 48000
    }
}

NOTE: I tried with or without bindings definition on "copyToRealtek", same result

My questions are:
1) what is my "master" that is being copied to hw:1,0? That is different from my pcm.!default, as it seems
2) how can I define such master? (wouldn't have been easier if their copy plugin had a source specification?)
3) where are the logs when the PCMs do not match and there is some warning/error? just to not make blind tests as I am doing...

Edit: now I am looking at http://de.mcbf.net/david/dotasoundrc/, looks like better than examples in official documentation

Last edited by neagix (2014-04-13 11:08:12)

Offline

#8 2014-04-13 11:53:15

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Enabling headphone audio

I assume, since I do not use copy myself, whatever calls pcm.copy is its master, you just specify its slaves.

period_time 0; period_size 1024

Decide between one, using both does not make sense.

And there is a dmix (pcm.dmix) running on default card (on card 0) without any further configuraion by default, which is the reason reordering modules for modprobe is a method for setting the default device.

pcm.!default { type plug; slave.pcm { type copy; slave.pcm "headphones"; slave.pcm "lcdhdmi"; } }
pcm.!headphones { type dmix; ipc_key 1001; slave.pcm "hw:1,0"; slave.rate 48000; }
pcm.!lcdhdmi { type dmix; ipc_key 1002; slave.pcm "hw:0,8"; slave.rate 48000; }

Using something like that I do not get any errors, but am unable at this moment to actually test it. I will look into it later. This ~/.asoundrc probably needs a type plug somewhere in between, because copys data format must match on input and output. However the whole copying might be more difficult than that, look here also.

Edit: I am not going to change this, but the second slave.pcm in copy plugin overwrites the first, since copy takes only one. Using plugins multi with route might be the fastest way to get this working.

Last edited by emeres (2014-04-13 12:24:29)

Offline

#9 2014-04-13 21:37:58

neagix
Member
Registered: 2013-10-19
Posts: 14

Re: Enabling headphone audio

That example does not work, only the latest slave.pcm is picked up (I verified this by inverting their order).

Thanks for the pointers, I am afraid I will have to use multi for this

Offline

#10 2014-04-13 22:15:23

neagix
Member
Registered: 2013-10-19
Posts: 14

Re: Enabling headphone audio

The guy in 1st link had it right, this is what I am  testing now:

pcm.!default {
        type plug
        slave.pcm "mout"

        ttable.0.0 1.0
        ttable.1.1 1.0
        ttable.0.2 1.0
        ttable.1.3 1.0
        ttable.2.4 1.0
        ttable.3.5 1.0
        ttable.4.6 1.0
        ttable.5.7 1.0
}

pcm.mout {
        type multi
        slaves.a.pcm "hw:0,8"
        slaves.a.channels 2
        slaves.b.pcm "hw:1,0"
        slaves.b.channels 6
        bindings.0.slave a
        bindings.0.channel 0
        bindings.1.slave a
        bindings.1.channel 1
        bindings.2.slave b
        bindings.2.channel 0
        bindings.3.slave b
        bindings.3.channel 1
        bindings.4.slave b
        bindings.4.channel 2
        bindings.5.slave b
        bindings.5.channel 3
        bindings.6.slave b
        bindings.6.channel 4
        bindings.7.slave b
        bindings.7.channel 5
}

Strangely enough, the 6 channels exist on the headphones side (Realtek) and not on the HDMI, and I cannot reduce them without screwing it up (again: no logs nor good errors reported by ALSA).

The victim of this asoundrc is dmix: I cannot play anymore with multiple applications at the same time.
This mailing list message advices  to create a dmix pcm for each hardware device, then use multi on the dmix pcms. Useless to say, that didn't work.

Also I tried the .asoundrc from this thread and with proper modifications I could only get garbled noise or a segfault in libasound (!!!)

I have not yet found a solution, but PulseAudio didn't have me! smile

Thanks for the support

Offline

#11 2014-04-15 19:39:48

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Enabling headphone audio

pcm.dmixazalia {        type dmix;
                ipc_key 1003;
                slave { pcm "hw:SB";
                        format S32_LE;
                        channels 8;
                        period_size 4096;
                        buffer_size 8192;
                        rate 192000;    }       }

pcm.dmixprodigy {       type dmix;
                ipc_key 1001;
                slave { pcm "hw:HiFi";
                        format S32_LE;
                        channels 8;
                        period_size 4096;
                        buffer_size 8192;
                        rate 192000;    }       }

pcm.mout22 {    type multi;
                slaves.a.pcm "plug:dmixprodigy";
                slaves.a.channels 2;
                slaves.b.pcm "plug:dmixazalia";
                slaves.b.channels 2;
                bindings.0.slave a;
                bindings.0.channel 0;
                bindings.1.slave a;
                bindings.1.channel 1;
                bindings.2.slave b;
                bindings.2.channel 0;
                bindings.3.slave b;
                bindings.3.channel 1;   }

pcm.min22 {     type plug;
                slave.pcm "mout22";
                ttable.0.0 0.1;
                ttable.1.1 0.1;
                ttable.2.2 0.1;
                ttable.3.3 0.1;
                ttable.0.2 0.1;
                ttable.1.3 0.1;
                ttable.2.0 0.1;
                ttable.3.1 0.1; }

For copying 2 channels to 2 sound cards using plughw directly works, this setup gives me a broken pipe error:

Write error: -32,Broken pipe

Offline

Board footer

Powered by FluxBB