[Dell OptiPlex 745,AD1983]Regression: Input from Line-in / Mic can't be listened in the output anymore

Bug #1257973 reported by Jarno Suni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ALSA driver
Unknown
Unknown
alsa-driver (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

http://www.alsa-project.org/db/?f=83f1bfaa94d748937742cda7b24cd811a4f3889c
I am not using pulseaudio.
The problem is with alsamixer controls of the HDA Intel audio device: There is no more playback control for Mic and Line-in inputs. In ubuntu 13.04 there are such alsa mixer controls, but not anymore in ubuntu 13.10, which should be fixed.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: alsa-base 1.0.25+dfsg-0ubuntu4
ProcVersionSignature: Ubuntu 3.11.0-14.6-lowlatency 3.11.7
Uname: Linux 3.11.0-14-lowlatency x86_64
ApportVersion: 2.12.5-0ubuntu2.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: jarno 4061 F.... panel-10-mixer
 /dev/snd/controlC0: jarno 4061 F.... panel-10-mixer
CurrentDmesg:
 [ 50.091713] Adding 993052k swap on /dev/zram1. Priority:5 extents:1 across:993052k SSFS
 [ 724.144750] perf samples too long (2507 > 2500), lowering kernel.perf_event_max_sample_rate to 50000
Date: Thu Dec 5 01:31:17 2013
InstallationDate: Installed on 2013-06-24 (163 days ago)
InstallationMedia: Ubuntu-Studio 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
PackageArchitecture: all
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
SourcePackage: alsa-driver
UpgradeStatus: Upgraded to saucy on 2013-12-04 (0 days ago)
dmi.bios.date: 06/26/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 2.6.6
dmi.board.name: 0RF703
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 6
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr2.6.6:bd06/26/2011:svnDellInc.:pnOptiPlex745:pvr:rvnDellInc.:rn0RF703:rvr:cvnDellInc.:ct6:cvr:
dmi.product.name: OptiPlex 745
dmi.sys.vendor: Dell Inc.

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

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

please file bug report at kernel.org

it is a bug to create alt analog device and independent headphone when codec only has one DAC

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

Node 0x03 [Audio Output] wcaps 0x441: Stereo
  Device: name="AD1983 Analog", type="Audio", device=0
  Device: name="AD1983 Alt Analog", type="Audio", device=2
  Converter: stream=0, channel=0
  Power states: D0 D3
  Power: setting=D0, actual=D0
  Processing caps: benign=1, ncoeff=70

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

Should "PCM Playback Volume" and "PCM Playback Switch" rename as "Front Playback Volume" or "Front Playack Switch" since these controls are not share by headphone/speaker ?

Node 0x05 [Pin Complex] wcaps 0x400185: Stereo Amp-Out
  Control: name="PCM Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  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=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
  Amp-Out vals: [0x3d 0x3d]
  Pincap 0x00000017: OUT Detect Trigger ImpSense
  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
  Connection: 2
     0x03* 0x0e

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

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=bd450dcc357646cc277c560ab24b35f940efa585

-static const struct snd_kcontrol_new ad1983_mixers[] = {
- HDA_CODEC_VOLUME("Front Playback Volume", 0x05, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Front Playback Switch", 0x05, 0x0, HDA_OUTPUT),

- HDA_CODEC_VOLUME("Mic Playback Volume", 0x12, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Mic Playback Switch", 0x12, 0x0, HDA_OUTPUT),
- HDA_CODEC_VOLUME("Line Playback Volume", 0x13, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Line Playback Switch", 0x13, 0x0, HDA_OUTPUT),

Node 0x0e [Audio Mixer] wcaps 0x200101: Stereo
  Connection: 3
     0x11 0x12 0x13

Node 0x12 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals: [0x97 0x97]
  Connection: 1
     0x0c
Node 0x13 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals: [0x97 0x97]
  Connection: 1
     0x0d

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

- HDA_CODEC_VOLUME("PCM Playback Volume", 0x11, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("PCM Playback Switch", 0x11, 0x0, HDA_OUTPUT),

The Amp Out should be set at 0dB if the driver don't create this volume control/switch

Node 0x11 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals: [0x97 0x97]
  Connection: 1
     0x03

Revision history for this message
Jarno Suni (jarnos) wrote :

As for #3, the PCM controls in alsamixer change volume in the line-out jack, which is located at the back of my computer.

Revision history for this message
Jarno Suni (jarnos) wrote :

As for #2, I don't think so. The current Headphone, Speaker and PCM controls in alsamixer control headphone, computer speaker and line-out volume independently, respectively. What is missing, is the ability to mix line-in and/or microphone input to these outputs. It was possible in ubuntu 13.04 with the same hardware.

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

as your codec only has one DAC 0x03 , it is impossible to provide multistreaming playback

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.

Revision history for this message
Jarno Suni (jarnos) wrote :

I am not talking about that kind of multistream playback. I want an option to mix microphone input and/or line input with whatever else the audio device plays in one or more of its outputs.

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

The author of the patch told that the analog loopback is fixed in the upcoming 3.12.y kernel, or 3.13-rc2.

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

have you try the daily build ?

does it really fix the missing mic playback volume and line in playback volume ?

https://code.launchpad.net/~ubuntu-audio-dev/+archive/alsa-daily/+packages

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

autoconfig: line_outs=1 (0x5/0x0/0x0/0x0/0x0) type:line
   speaker_outs=1 (0x7/0x0/0x0/0x0/0x0)
   hp_outs=1 (0x6/0x0/0x0/0x0/0x0)
   mono: mono_out=0x0
   inputs:
     Mic=0x8
     Line=0x9

==> Best config: lo_type=0, wired=1, mio=1
multi_outs = 5/0/0/0 : 3/0/0/0 (type LO)
  out path: depth=2 :03:05
hp_outs = 6/0/0/0 : 3/0/0/0
  hp path: depth=2 :03:06
spk_outs = 7/0/0/0 : 3/0/0/0
  spk path: depth=4 :03:0b:0f:07
  mix path: depth=4 :03:11:0e:05
  mix path: depth=4 :03:11:0e:06
  mix path: depth=6 :03:11:0e:0b:0f:07

loopback path: depth=4 :08:0c:12:0e
input path: depth=4 :08:0c:14:04
loopback path: depth=4 :09:0c:12:0e
input path: depth=4 :09:0c:14:04
hda-codec: Enable HP auto-muting on NID 0x6

CTRL: add: Mic Playback Volume:0
CTRL: add: Mic Playback Switch:0
CTRL: add: Line Playback Volume:0
CTRL: add: Line Playback Switch:0

Node 0x12 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Control: name="Mic Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Mic Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Line Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Line Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals: [0x80 0x80]
  Connection: 1
     0x0c
Node 0x13 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals: [0x97 0x97]
  Connection: 1
     0x0d

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

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

you need to define spec->gen.mixer_id = 0x0e in patch_ad1983 to get the loopback mixing switch

summary: - Regression: Input from Line-in / Mic can't be listened in the output
- anymore
+ [Dell OptiPlex 745,AD1983]Regression: Input from Line-in / Mic can't be
+ listened in the output anymore
Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Revision history for this message
Jarno Suni (jarnos) wrote :

Raumond, no I have not tried ALSA-daily.

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

loopback path: depth=4 :08:0c:12:0e
loopback path: depth=4 :09:0c:12:0e

- HDA_CODEC_VOLUME("Mic Playback Volume", 0x12, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Mic Playback Switch", 0x12, 0x0, HDA_OUTPUT),
- HDA_CODEC_VOLUME("Line Playback Volume", 0x13, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Line Playback Switch", 0x13, 0x0, HDA_OUTPUT),

if you compared with the previous assignment , the loopback path should be :09:0d:13:0e instead of :09:0c:12:0e

it is not easy to find the possible connection path if the driver start from the pins instead of mixer 0x0e

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

Have you file a bug report at kernel.org ?

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

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

the driver should select the path without boost (stepsize=0x27) when the pin is line in

it is a side effect of the driver to create "Line Boost Volume" control

Node 0x0c [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Control: name="Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-Out vals: [0x00 0x00]
  Connection: 2
     0x08 0x09*
Node 0x0d [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x09* 0x08

Revision history for this message
Jarno Suni (jarnos) wrote :

No I have not reported at kernel.org.

Revision history for this message
Jarno Suni (jarnos) wrote :

Why did you suggest me to try alsa-daily, if you think that could fix the bug?

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

missing mixer_nid can be added using hint

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

Hint Strings
~~~~~~~~~~~~
The codec parser have several switches and adjustment knobs for
matching better with the actual codec or device behavior. Many of
them can be adjusted dynamically via "hints" strings as mentioned in
the section above.

- mixer_nid (int): specifies the widget NID of the analog-loopback
  mixer

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

this patch won't fix your problem because it won't add "Line Playback Volume" at node 0x13

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

Node 0x0e [Audio Mixer] wcaps 0x200101: Stereo
  Connection: 3
     0x11 0x12 0x13

the mixer has three connection,

node 0x11 is connected to DAC node 0x03

- HDA_CODEC_VOLUME("PCM Playback Volume", 0x11, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("PCM Playback Switch", 0x11, 0x0, HDA_OUTPUT),

Node 0x11 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals: [0x97 0x97]
  Connection: 1
     0x03

only these two node can connect to input pins

Node 0x12 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals: [0x97 0x97]
  Connection: 1
     0x0c
Node 0x13 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals: [0x97 0x97]
  Connection: 1
     0x0d

only node 0x0c has boost volume control, so Line in Playback Volume must create at node 0x13
otherwise you won't get Mic Boost if driver create Line in Playback Volume at node 0x12

Node 0x0c [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Control: name="Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-Out vals: [0x00 0x00]
  Connection: 2
     0x08 0x09*
Node 0x0d [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x09* 0x08

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

I wish this will be fixed in ubuntu 14.04. Is there a way to test it in 13.10?

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

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_analog.c?id=cbd209f41ea5f39394de5c1fe2dd9aa54a9c5744

indep headphone had been disabled by this patch

 it won't be fixed if you did not file a bug at the kernel.org about the "PCM playback Volume" instead of "front playback volume" ,

Node 0x05 [Pin Complex] wcaps 0x400185: Stereo Amp-Out
  Control: name="PCM Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  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=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
  Amp-Out vals: [0x3d 0x3d]
  Pincap 0x00000017: OUT Detect Trigger ImpSense
  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
  Connection: 2
     0x03* 0x0e

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

have you filed a bug at https://bugzilla.kernel.org/enter_bug.cgi?product=Drivers

0e Analog Mixer Selectively mixes analog input signals into a single signal.

11 Front Mix Amp Individual gain control for the DAC (front) input to the analog mixer.
12 Individual gain control for the Port-B (front microphone) input to the analog mixer.
13 Individual gain control for the Port-C (line in) input to the analog mixer.

seem similar to https://bugzilla.kernel.org/show_bug.cgi?id=68081

the amp of the audio mixer 0x0e is at the nodes (0x11, 0x12 and 0x13) in the connection list

Node 0x0e [Audio Mixer] wcaps 0x200101: Stereo
  Connection: 3
     0x11 0x12 0x13

Node 0x11 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals: [0x97 0x97]
  Connection: 1
     0x03

Node 0x12 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals: [0x97 0x97]
  Connection: 1
     0x0c
Node 0x13 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals: [0x97 0x97]
  Connection: 1
     0x0d

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

0x0c Microphone Selector/Boost
Allows microphone source port selection and boost preamplifier setting.

0x0d Line In Selector
Allows line in source port selection.

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

15 Analog Power-Down Power widget

Controls power on analog mixer and associated amplifiers. This
controls the power of all widgets in its connection list.

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

if it is a regression of this patch

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=bd450dcc357646cc277c560ab24b35f940efa585

you can use hda-analyzer connect the loopback mixer

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

The headphone and speaker were connected to node 0x0e instead of 0x3 in previous version

- /* Front, HP selectors; from Mix */
- {0x05, AC_VERB_SET_CONNECT_SEL, 0x01},
- {0x06, AC_VERB_SET_CONNECT_SEL, 0x01},

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

mic and Line playback volume /switch were create at node 0x12 and 0x13

- HDA_CODEC_VOLUME("Mic Playback Volume", 0x12, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Mic Playback Switch", 0x12, 0x0, HDA_OUTPUT),
- HDA_CODEC_VOLUME("Line Playback Volume", 0x13, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Line Playback Switch", 0x13, 0x0, HDA_OUTPUT),

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

 add back the loopback mixer 0x0e in function patch_ad1983()

spec->gen.mixer_nid = 0x0e;

Revision history for this message
Jarno Suni (jarnos) wrote :

As for #26, I have not filed another bug report, and I think the report you featured is not the same issue. Isn't the bug description clear?

Revision history for this message
Jarno Suni (jarnos) wrote :
Revision history for this message
Jarno Suni (jarnos) wrote :

Fixed in ubuntu 14.04

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