[Both front and rear Line-In] No sound (codec parsing fails)

Bug #923409 reported by Christian Schürer-Waldheim
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
David Henningsson

Bug Description

Since the update of the kernel (version 3.2.0-11 and 3.2.0-12) sound does not work anymore (probably due to the alsa-related changes made in 3.2.0-11 https://launchpad.net/ubuntu/precise/+source/linux/3.2.0-11.19)

The output of "cat /proc/asound/pcm" is empty (the soundcard is listed properly there with kernel prior to 3.2.0-11).

The drivers are loaded, though:

00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
        Subsystem: Hewlett-Packard Company Device 2a5d
        Flags: bus master, fast devsel, latency 0, IRQ 43
        Memory at f9ef8000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd-hda-intel
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices: **** List of PLAYBACK Hardware Devices ****
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
ArecordDevices: **** List of CAPTURE Hardware Devices ****
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path', '/dev/snd/controlC0', '/dev/snd/hwC0D0', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf9ef8000 irq 43'
   Mixer name : 'Realtek ALC1200'
   Components : 'HDA:10ec0888,103c2a5d,00100101'
   Controls : 2
   Simple ctrls : 2
DistroRelease: Ubuntu 12.04
HibernationDevice: RESUME=UUID=36e5929e-9339-49af-a141-1070fbcb5817
InstallationMedia: Kubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
MachineType: HP-Pavilion GJ378AA-ACP a6145.at
Package: linux (not installed)
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-12-generic root=UUID=448fc76a-95f5-4299-9523-b17de0dd9e94 ro plymouth:force-drm pcie_aspm=force quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.2.0-12.20-generic 3.2.2
RelatedPackageVersions:
 linux-restricted-modules-3.2.0-12-generic N/A
 linux-backports-modules-3.2.0-12-generic N/A
 linux-firmware 1.68
Tags: precise
Uname: Linux 3.2.0-12-generic x86_64
UpgradeStatus: Upgraded to precise on 2011-12-27 (33 days ago)
UserGroups: adm admin cdrom dialout fuse lpadmin plugdev sambashare sudo vboxusers x2gousers
dmi.bios.date: 10/24/2007
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 5.13
dmi.board.name: Berkeley
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr5.13:bd10/24/2007:svnHP-Pavilion:pnGJ378AA-ACPa6145.at:pvr:rvnASUSTeKComputerINC.:rnBerkeley:rvr1.xx:cvnHewlett-Packard:ct3:cvrChassisVersion:
dmi.product.name: GJ378AA-ACP a6145.at
dmi.sys.vendor: HP-Pavilion

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 923409

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : AcpiTables.txt

apport information

tags: added: apport-collected precise
description: updated
Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : AlsaDevices.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : BootDmesg.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : Card0.Codecs.codec.0.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : IwConfig.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : Lspci.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : Lsusb.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : PciMultimedia.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : ProcModules.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : PulseSinks.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : PulseSources.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : RfKill.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : UdevDb.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : UdevLog.txt

apport information

Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux (Ubuntu):
assignee: nobody → David Henningsson (diwic)
Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key regression-update
summary: - No sound
+ [Both font and rear Line-In] No sound)
summary: - [Both font and rear Line-In] No sound)
+ [Both font and rear Line-In] (No sound, as codec parsing fails)
summary: - [Both font and rear Line-In] (No sound, as codec parsing fails)
+ [Both font and rear Line-In] No sound (codec parsing fails)
summary: - [Both font and rear Line-In] No sound (codec parsing fails)
+ [Both front and rear Line-In] No sound (codec parsing fails)
Revision history for this message
David Henningsson (diwic) wrote : [PATCH] ALSA: HDA: Fix jack creation for codecs with front and rear Line In

If a codec has both a front and a rear Line In, two controls both
named "Line Jack" will be created, which causes parsing to fail.
While a long term solution might be to name the jacks differently,
this extra check is consistent with what is already being done in many
auto-parsers, and will also protect against other cases when two
inputs have the same label.

BugLink: https://bugs.launchpad.net/bugs/923409
Signed-off-by: David Henningsson <email address hidden>
---
 sound/pci/hda/hda_jack.c | 24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c
index d8a35da..9d819c4 100644
--- a/sound/pci/hda/hda_jack.c
+++ b/sound/pci/hda/hda_jack.c
@@ -282,7 +282,8 @@ int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
 EXPORT_SYMBOL_HDA(snd_hda_jack_add_kctl);

 static int add_jack_kctl(struct hda_codec *codec, hda_nid_t nid,
- const struct auto_pin_cfg *cfg)
+ const struct auto_pin_cfg *cfg,
+ char *lastname, int *lastidx)
 {
  unsigned int def_conf, conn;
  char name[44];
@@ -298,6 +299,10 @@ static int add_jack_kctl(struct hda_codec *codec, hda_nid_t nid,
   return 0;

  snd_hda_get_pin_label(codec, nid, cfg, name, sizeof(name), &idx);
+ if (!strcmp(name, lastname) && idx == *lastidx)
+ idx++;
+ strncpy(lastname, name, 44);
+ *lastidx = idx;
  err = snd_hda_jack_add_kctl(codec, nid, name, idx);
  if (err < 0)
   return err;
@@ -311,41 +316,42 @@ int snd_hda_jack_add_kctls(struct hda_codec *codec,
       const struct auto_pin_cfg *cfg)
 {
  const hda_nid_t *p;
- int i, err;
+ int i, err, lastidx = 0;
+ char lastname[44] = "";

  for (i = 0, p = cfg->line_out_pins; i < cfg->line_outs; i++, p++) {
- err = add_jack_kctl(codec, *p, cfg);
+ err = add_jack_kctl(codec, *p, cfg, lastname, &lastidx);
   if (err < 0)
    return err;
  }
  for (i = 0, p = cfg->hp_pins; i < cfg->hp_outs; i++, p++) {
   if (*p == *cfg->line_out_pins) /* might be duplicated */
    break;
- err = add_jack_kctl(codec, *p, cfg);
+ err = add_jack_kctl(codec, *p, cfg, lastname, &lastidx);
   if (err < 0)
    return err;
  }
  for (i = 0, p = cfg->speaker_pins; i < cfg->speaker_outs; i++, p++) {
   if (*p == *cfg->line_out_pins) /* might be duplicated */
    break;
- err = add_jack_kctl(codec, *p, cfg);
+ err = add_jack_kctl(codec, *p, cfg, lastname, &lastidx);
   if (err < 0)
    return err;
  }
  for (i = 0; i < cfg->num_inputs; i++) {
- err = add_jack_kctl(codec, cfg->inputs[i].pin, cfg);
+ err = add_jack_kctl(codec, cfg->inputs[i].pin, cfg, lastname, &lastidx);
   if (err < 0)
    return err;
  }
  for (i = 0, p = cfg->dig_out_pins; i < cfg->dig_outs; i++, p++) {
- err = add_jack_kctl(codec, *p, cfg);
+ err = add_jack_kctl(codec, *p, cfg, lastname, &lastidx);
   if (err < 0)
    return err;
  }
- err = add_jack_kctl(codec, cfg->dig_in_pin, cfg);
+ err = add_jack_kctl(codec, cfg->dig_in_pin, cfg, lastname, &lastidx);
  if (err < 0)
   return err;
- err = add_jack_kctl(codec, cfg->mono_out_pin, cfg);
+ err = add_jack_kctl(codec, cfg->mono_out_pin, cfg, lastname, &lastidx);
  if (err < 0)
   return err;
  return 0;
--
1.7.8.3

Changed in linux (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
David Henningsson (diwic) wrote :

Hi!

Thanks for testing the development version of Ubuntu!

Given your logs, I was able to track the bug down, send it to upstream, who has now committed it.
However upstream has also asked for alsa-info ( https://wiki.ubuntu.com/Audio/AlsaInfo ) to aid regression tests later. Could you please attach an alsa-info as well? Thanks!

Changed in linux (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote :

Hi David,

thanks for fixing this bug. I'll provide feedback as soon as an patched kernel is available.

The requested alsa-info can be found here:

http://www.alsa-project.org/db/?f=f4a8312f34573a24f60011109e18f0c7371129e0

tags: added: rls-p-tracking
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi David,

I've gone ahead an fetched the patch noted in comment #22 from takashi's tree and applied it to the Precise master-next branch. It should be available in the next Ubuntu Preicse kernel upload. Thanks.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.2.0-13.22

---------------
linux (3.2.0-13.22) precise; urgency=low

  [ Alex Deucher ]

  * (pre-stable): drm/radeon/kms: move panel mode setup into encoder mode
    set
    - LP: #925538
  * (pre-stable): drm/radeon/kms: rework modeset sequence for DCE41 and
    DCE5
    - LP: #925538

  [ Andy Whitcroft ]

  * [Config] review IPv6 configuration options and enable

  [ David Henningsson ]

  * SAUCE: ALSA: HDA: Remove quirk for Toshiba Qosmio G50
    - LP: #923316
  * SAUCE: ALSA: HDA: Fix jack creation for codecs with front and rear Line
    In
    - LP: #923409

  [ James M. Leddy ]

  * SAUCE: Bluetooth: Add support for BCM20702A0 [0a5c:21e6]
    - LP: #906832

  [ Manoj Iyer ]

  * SAUCE: Bluetooth: Add support for BCM20702A0 [0a5c:21e1]
    - LP: #906832
  * SAUCE: Add vendor specific ID (0a5c 21f3) for BCM20702A0.
    - LP: #925552

  [ Seth Forshee ]

  * (pre-stable): drm/radeon/kms: disable output polling when suspended
    - LP: #925570

  [ Tim Gardner ]

  * [Config] CONFIG_BLK_DEV_PCIESSD_MTIP32XX=m
    - LP: #922221
  * [Config] Add mtip32xx to d-i block modules
    - LP: #922221
  * [Config] Enable USB3.0 in d-i

  [ Upstream Kernel Changes ]

  * block: Add driver for Micron RealSSD pcie flash cards
    - LP: #922221
  * mtip32xx: fix warnings/errors on 32-bit compiles
    - LP: #922221
  * mtip32xx: cleanup compat ioctl handling
    - LP: #922221
  * mtip32xx: ensure that all local functions are static
    - LP: #922221
  * mtip32xx: mark a few more items static
    - LP: #922221
  * mtip32xx: add module.h include to avoid conflict with moduleh tree
    - LP: #922221
  * mtip32xx: update to new ->make_request() API
    - LP: #922221
  * mtip32xx: updates based on feedback
    - LP: #922221
  * mtip32xx: uninitialized variable in mtip_quiesce_io()
    - LP: #922221
  * mtip32xx: do rebuild monitoring asynchronously
    - LP: #922221
  * watchdog: iTCO_wdt: add Intel Lynx Point DeviceIDs
    - LP: #900119
  * drm/i915: mask transcoder select bits before setting them on LVDS
    - LP: #924989
  * (pre-stable) USB: Realtek cr: fix autopm scheduling while atomic
    - LP: #917962
  * nouveau: properly check for _DSM function support
    - LP: #925608
  * nouveau: Support Optimus models for vga_switcheroo
    - LP: #925608
 -- Leann Ogasawara <email address hidden> Thu, 02 Feb 2012 13:26:59 -0800

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote :

Many thanks to David Henningsson for fixing this bug and to Leann Ogasawara for pulling the fix into the kernel.

I've installed it and can confirm that the problem is fixed. Thanks once again.

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.