[Thinkpad R61i/T61] Lenovo sound chip Conexant CX20549 Venice doesn't work correctly.

Bug #886975 reported by c4pp4
78
This bug affects 18 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

Computer: IBM Lenovo Thinkpad R61i
Card: HDA Intel
Sound chip: Conexant CX20549 (Venice)
Device: 00:1b.0 Audio device [0403]: Intel Corporation 82801H (ICH8 Family) HD Audio Controller [8086:284b] (rev 03)
 Subsystem: Lenovo ThinkPad T61 [17aa:20ac]
System: Ubuntu Oneiric 11.10 (desktop-i386)
Kernel: 3.0.0-12-generic-pae#20-Ubuntu SMP Fri Oct 7 16:37:17 UTC 2011

Problems:
1) Integrated microphone doesn't work at all because the driver uses node 0x14 instead of 0x15 for integrated mic and node 0x12 instead of 0x14 for external mic.
2) Sound output is muted in the "0% <-> unamplified" part of the volume slider and is working in the "unamplified <-> 100% ->" part only; the driver doesn't allow amplified part because sound is distorted over 0dB of the PCM level so there is no need amplified part of the volume slider.

Solution: Attached patch is fixing nodes of integrated and external microphone and is removing the amplified part of the volume slider.
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu4
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: c4pp4 1698 F.... pulseaudio
 /dev/snd/pcmC0D0p: c4pp4 1698 F...m pulseaudio
CRDA: Error: [Errno 2] Adresář nebo soubor neexistuje
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfe100000 irq 48'
   Mixer name : 'Conexant CX20549 (Venice)'
   Components : 'HDA:14f15045,17aa20db,00100100'
   Controls : 19
   Simple ctrls : 10
Card29.Amixer.info:
 Card hw:29 'ThinkPadEC'/'ThinkPad Console Audio Control at EC reg 0x30, fw 7KHT24WW-1.08'
   Mixer name : 'ThinkPad EC 7KHT24WW-1.08'
   Components : ''
   Controls : 1
   Simple ctrls : 1
Card29.Amixer.values:
 Simple mixer control 'Console',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
DistroRelease: Ubuntu 11.10
HibernationDevice: RESUME=UUID=6e091b39-d59a-4d75-a7c5-dec246d020e5
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
MachineType: LENOVO 89329ZG
Package: linux (not installed)
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-12-generic-pae root=UUID=666241df-0a9e-4711-a44e-92d2e6f5eccc ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic-pae 3.0.4
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-12-generic-pae N/A
 linux-backports-modules-3.0.0-12-generic-pae N/A
 linux-firmware 1.60
Tags: oneiric
Uname: Linux 3.0.0-12-generic-pae i686
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare vboxusers
dmi.bios.date: 04/09/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 7OETC4WW (2.24 )
dmi.board.name: 89329ZG
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr7OETC4WW(2.24):bd04/09/2010:svnLENOVO:pn89329ZG:pvrThinkPadR61/R61i:rvnLENOVO:rn89329ZG:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 89329ZG
dmi.product.version: ThinkPad R61/R61i
dmi.sys.vendor: LENOVO

Revision history for this message
c4pp4 (c4pp4) 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 886975

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
tags: added: oneiric
Revision history for this message
c4pp4 (c4pp4) wrote : AcpiTables.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
c4pp4 (c4pp4) wrote : AlsaDevices.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : AplayDevices.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : BootDmesg.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : Card0.Codecs.codec.0.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : CurrentDmesg.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : IwConfig.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : Lspci.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : Lsusb.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : PciMultimedia.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : ProcEnviron.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : ProcInterrupts.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : ProcModules.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : PulseSinks.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : PulseSources.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : RfKill.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : UdevDb.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : UdevLog.txt

apport information

Revision history for this message
c4pp4 (c4pp4) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → New
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
c4pp4 (c4pp4)
summary: - Lenovo Conexant CX20549 Venice doesn't work correctly.
+ Lenovo sound chip Conexant CX20549 Venice doesn't work correctly.
description: updated
tags: added: patch
Revision history for this message
Joseph Salisbury (jsalisbury) wrote : Re: Lenovo sound chip Conexant CX20549 Venice doesn't work correctly.

@c4pp4

Is this a new issue, or do you happen to know if this issue existed in prior releases?

Revision history for this message
c4pp4 (c4pp4) wrote :

@ Joseph Salisbury

The issue #1 (microphone) is known from the time when this computer model comes to market in 2008, the patch I made is from 3/2009. The issue #2 (about unamplified part) is a new from Oneiric but the patch is solving it in its old state, so I have reported the new bug and summarize both issues in one.

c4pp4 (c4pp4)
description: updated
Revision history for this message
c4pp4 (c4pp4) wrote :

Patched Linux Kernel Ubuntu 11.10 - Oneiric Ocelot:
https://launchpad.net/~c4pp4/+archive/ppa

Revision history for this message
Brad Figg (brad-figg) wrote :

@c4pp4,

1. I have put up test kernels at: http://people.canonical.com/~bradf/lp886975/
    These are the latest Oneiric kernel plus your patch. Please test and make sure
    they resolve your issue.

2. Have you tried to submit your patch upstream to get it into the main kernel tree?

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
c4pp4 (c4pp4) wrote :

I've just upgraded the official oneiric kernel from 3.0.0-13 to 3.0.0-14 and found out that there is a change causing the microphone working finally correctly.
I've searched what happened and here is a possible answer: http://git.alsa-project.org/?p=alsa-kernel.git;a=commitdiff;h=6b45214277bec2193ad3ccb8d7aa6100b5a0f1a9

Can anybody confirm that microphone is working correctly now?

Revision history for this message
Eugene Savelov (savelov) wrote :

yes I confirm on Lenovo R61i internal microphone is working with 3.0.0-14-generic kernel. previously I had to use the modified kernel from this bugreport. But as a side note, I noticed that output from earphones connected to the audio-out connector are not working with this kernel

Revision history for this message
c4pp4 (c4pp4) wrote :

@ Eugene Savelov
Thanks. There are trying to use a new way of autoconfig and it seems it's not ok yet.

Revision history for this message
c4pp4 (c4pp4) wrote :

@ Brad Figg

1. Yes, I've tested it and it's resolving my issue.
2. No.

Thanks.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Jan-Pieter Jacobs (jpjacobs) wrote :

Hi, I also had the same problem. I can confirm that the 3.0.0.14-generic kernel fixes (more or less) the microphone problem. Testing with skype, the sound was a bit crackly.

Another thing to notice is that apparently the volume does not scale linearly as would be expected when upping/downing the volume. 4 ticks down from the maximum, the output is to silent too hear (while the slider is at +- 75%).

But anyway, it appears things are finally going in the good direction! Thanks for the effort!

Revision history for this message
c4pp4 (c4pp4) wrote :

Summary:

Stable kernel 3.0.0-14 is BAD (still issue #2 and regression with headphones)

Brad Figg kernel 3.0.0-15 is OK

Revision history for this message
Eugene Savelov (savelov) wrote :

I also confirm that with Brag Figg's 3.0.0-15 kernel headphones work correctly, and microphone issue is resolved

Revision history for this message
c4pp4 (c4pp4) wrote :

I've tried the latest daily live of Precise and headphones works. So there is only (probably) problem with sound muted between 0 and unapmlified part of volume slider now.

Anyway I've updated oneiric ppa.

"Jan-Pieter Jacobs (jpjacobs) wrote on 2011-12-17: #32
Hi, I also had the same problem. I can confirm that the 3.0.0.14-generic kernel fixes (more or less) the microphone problem. Testing with skype, the sound was a bit crackly."

Have you tried my oneiric ppa kernel? There is a crackling Skype sound too?

Revision history for this message
Brad Figg (brad-figg) wrote :

I've been informed that it is unlikely the patch will be accepted upstream due to use of an "old" model. Can people affected by this issue take a look at: https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS and see if that dkms package will address this issue for them?

Revision history for this message
c4pp4 (c4pp4) wrote :

@Brad Figg

Thank you. The alsa-hda-dkms package has the same behavior as I previously (#35) wrote about Precise version. Microphone OK, headphones OK, volume slider with unamplified part BAD (there is still sound muted).

I've also noted it uses directly a node 0x19 (Audio Output Analog) instead of a node 0x17 (Audio Mixer), but I don't know if it's necessary and has to do with sound quality. I guess that sound going through the node 0x17 is hardware mixed and through the 0x19 is post-mixed by a software driver. As I said I don't know.

I'm going to continue with my ppa because the volume slider problem is quite annoying and I believe the node 0x17 is right way of directing sound production. The "old" model is old but it just works instead of a "modern" autoconfig script.

And I keep that alsa-hda-dkms package installed because it can fill the moment between an official update and update of my ppa version.

Revision history for this message
c4pp4 (c4pp4) wrote :

Just a note to my last paragraph: It's necessary to uninstall the alsa-hda-dkms package after updating to my ppa kernel version.

Revision history for this message
c4pp4 (c4pp4) wrote :

Patched Linux Kernel Ubuntu 12.04 LTS - Precise Pangolin:
https://launchpad.net/~c4pp4/+archive/ppa

Revision history for this message
c4pp4 (c4pp4) wrote :

Please read carefully!

I've changed the way of providing the sound driver. Now I'm using the DKMS framework so there is no need to wait for my updates. Your system will be always updated with the correct sound driver.

I've created a package called 'lenovo-conexant-dkms'. It's a repack of the package provided by Ubuntu Audio Development Team (Brad Figg's link at #36).

I'm still using my old ppa (link at #39) so there is no need to change your repositories. Just install the new package called 'lenovo-conexant-dkms'.

A description of the changes are in my ppa. I've also included some minor upstream changes.

One issue is remaining to resolve. After the updgrade there is still a crackling (popping) sound when rebooting or shutting down the computer although the crackling sound when suspending the computer was eliminated. I'm using the following workaround to also eliminate it:

- fire up Terminal and follow the instructions

- create a script file amixer-master-mute (or download the attached one)
gksudo gedit /etc/init.d/amixer-master-mute

- insert the following code to mute the master mixer
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: amixer-master-mute
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop: 0 6
# Short-Description: Mute the Master mixer
# Description: Mute the Master mixer to avoid
# a crackling (popping) sound
# from the speakers when rebooting
# or shutting down the computer.
### END INIT INFO

case "$1" in
    start)
        ;;
    restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
    stop)
        amixer set Master mute > /dev/null
        ;;
    *)
        echo "Usage: $0 start|stop" >&2
        exit 3
        ;;
esac

exit 0

- save the script and set the execute flag on it
sudo chmod 755 /etc/init.d/amixer-master-mute

- set to start the script when rebooting or shutting down the computer (arguments are terminated by ".")
sudo update-rc.d amixer-master-mute start 20 0 6 .

- to remove the workaround
sudo update-rc.d -f amixer-master-mute remove
sudo rm /etc/init.d/amixer-master-mute

Revision history for this message
c4pp4 (c4pp4) wrote :

- crackling (popping) sound when idle - workaround:
sudo touch /etc/pm/power.d/intel-audio-powersave

- to remove the workaround
sudo rm /etc/pm/power.d/intel-audio-powersave

- the command creates an empty file and overrides (disables) the script "/usr/lib/pm-utils/power.d/intel-audio-powersave"

Revision history for this message
lunix (bob-l-lewis) wrote :

Anyone have a clue when a fix might make it into an update or a release? My friend doesn't want to do a patch but prefers to wait for an official fix.

Revision history for this message
c4pp4 (c4pp4) wrote :

I've updated the driver, now it supports the Ubuntu 12.10 - Quantal Quetzal.
https://launchpad.net/~c4pp4/+archive/ppa

Crackling (popping) sound issues still remain so please follow the instructions in the post #40 (issue when rebooting the computer), the post #41 (issue when on battery power) and newly the post #44 (issue when suspending the computer).

Revision history for this message
c4pp4 (c4pp4) wrote :

According to this post https://lists.launchpad.net/ubuntu-audio-dev/msg00290.html the script eliminating crackling sound when suspending the computer is considered as obsolete. I don't think so. I'm attaching the script file here.

- save the script to your home folder

- copy the script to the pm-utils folder
sudo cp ~/01PulseAudio /usr/lib/pm-utils/sleep.d

- set the execute flag on it
sudo chmod 755 /usr/lib/pm-utils/sleep.d/01PulseAudio

- to remove the workaround
sudo rm /usr/lib/pm-utils/sleep.d/01PulseAudio

Revision history for this message
c4pp4 (c4pp4) wrote :

I'm testing a new version of the driver, now there is no workaround needed to eliminate the crackling sound. If you wanna help me and give me a feedback please use the package for Ubuntu 12.10 Quantal from here: https://launchpad.net/~c4pp4/+archive/test/+files/lenovo-conexant-dkms_12.11.21_all.deb

you have to remove all the previous workarounds:
sudo update-rc.d -f amixer-master-mute remove
sudo rm /etc/init.d/amixer-master-mute
sudo rm /etc/pm/power.d/intel-audio-powersave
sudo rm /usr/lib/pm-utils/sleep.d/01PulseAudio

btw: I'm attaching the testing patch

Revision history for this message
c4pp4 (c4pp4) wrote :

I've updated the driver for Ubuntu 12.04 Lucid too. I don't have that version so would anybody test it? Download from here: https://launchpad.net/~c4pp4/+archive/test/+files/lenovo-conexant-dkms_12.11.28.1_all.deb

and of course you have to remove all the previous workarounds for crackling sound:
sudo update-rc.d -f amixer-master-mute remove
sudo rm /etc/init.d/amixer-master-mute
sudo rm /etc/pm/power.d/intel-audio-powersave

affects: linux (Ubuntu) → alsa-driver (Ubuntu)
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "oneiric_lenovo.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

Revision history for this message
Joseph Salisbury (jsalisbury) wrote : Re: Lenovo sound chip Conexant CX20549 Venice doesn't work correctly.

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.7 kernel[0] (Not a kernel in the daily directory) and install both the linux-image and linux-image-extra .deb packages.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7-rc6-raring/

Changed in alsa-driver (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
lunix (bob-l-lewis) wrote : Re: [Bug 886975] Re: Lenovo sound chip Conexant CX20549 Venice doesn't work correctly.
Download full text (5.6 KiB)

I really appreciate your working on this.
Unfortunately the computer with the problem is owned by a friend in another
town.

I don't often see him and certainly don't want to upset his stability. If
no one else can
do this then I would consider driving to him and trying the fix. I was
just hoping to have
it fixed magically during one of the upcoming updates from Ubuntu.

Cheers,
Bob

On Mon, Nov 19, 2012 at 8:31 AM, Joseph Salisbury <
<email address hidden>> wrote:

> Would it be possible for you to test the latest upstream kernel? Refer
> to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest
> v3.7 kernel[0] (Not a kernel in the daily directory) and install both
> the linux-image and linux-image-extra .deb packages.
>
> If this bug is fixed in the mainline kernel, please add the following
> tag 'kernel-fixed-upstream'.
>
> If the mainline kernel does not fix this bug, please add the tag:
> 'kernel-bug-exists-upstream'.
>
> If you are unable to test the mainline kernel, for example it will not
> boot, please add the tag: 'kernel-unable-to-test-upstream'.
> Once testing of the upstream kernel is complete, please mark this bug as
> "Confirmed".
>
>
> Thanks in advance.
>
> [0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7-rc6-raring/
>
>
> ** Changed in: alsa-driver (Ubuntu)
> Importance: Undecided => Medium
>
> ** Changed in: alsa-driver (Ubuntu)
> Status: Confirmed => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/886975
>
> Title:
> Lenovo sound chip Conexant CX20549 Venice doesn't work correctly.
>
> Status in “alsa-driver” package in Ubuntu:
> Incomplete
>
> Bug description:
> Computer: IBM Lenovo Thinkpad R61i
> Card: HDA Intel
> Sound chip: Conexant CX20549 (Venice)
> Device: 00:1b.0 Audio device [0403]: Intel Corporation 82801H (ICH8
> Family) HD Audio Controller [8086:284b] (rev 03)
> Subsystem: Lenovo ThinkPad T61 [17aa:20ac]
> System: Ubuntu Oneiric 11.10 (desktop-i386)
> Kernel: 3.0.0-12-generic-pae#20-Ubuntu SMP Fri Oct 7 16:37:17 UTC 2011
>
> Problems:
> 1) Integrated microphone doesn't work at all because the driver uses
> node 0x14 instead of 0x15 for integrated mic and node 0x12 instead of 0x14
> for external mic.
> 2) Sound output is muted in the "0% <-> unamplified" part of the volume
> slider and is working in the "unamplified <-> 100% ->" part only; the
> driver doesn't allow amplified part because sound is distorted over 0dB of
> the PCM level so there is no need amplified part of the volume slider.
>
> Solution: Attached patch is fixing nodes of integrated and external
> microphone and is removing the amplified part of the volume slider.
> ---
> AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
> ApportVersion: 1.23-0ubuntu4
> Architecture: i386
> ArecordDevices:
> **** List of CAPTURE Hardware Devices ****
> card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
> AudioDevicesInUse:
> USER PID ACCESS COMMAND
> /dev/snd/controlC0: c4pp4 ...

Read more...

Revision history for this message
Raymond (superquad-vortex2) wrote : Re: Lenovo sound chip Conexant CX20549 Venice doesn't work correctly.

>>I've also noted it uses directly a node 0x19 (Audio Output Analog) instead of a node 0x17 (Audio Mixer), but I don't know if it's necessary and has to do with sound quality. I guess that sound going through the node 0x17 is hardware mixed and through the 0x19 is post-mixed by a software driver. As I said I don't know.

node 0x17 is the analog mixer silmilar to ac97 analog mixer

you lost the mic playback volume controls and 12 dB gain of hardware PCM playback volume

Node 0x17 [Audio Mixer] wcaps 0x20050b: Stereo Amp-In
  Control: name="PCM Playback Volume", index=0, device=0
  Control: name="PCM Playback Switch", index=0, device=0
  Control: name="Int Mic Playback Volume", index=0, device=0
  Control: name="Int Mic Playback Switch", index=0, device=0
  Control: name="Ext Mic Playback Volume", index=0, device=0
  Control: name="Ext Mic Playback Switch", index=0, device=0
  Amp-In caps: ofs=0x14, nsteps=0x2b, stepsize=0x05, mute=1
  Amp-In vals: [0x14 0x14] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Power states: D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 5
     0x19 0x14 0x12 0x11 0x15

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

patch for Ubuntu 12.10 - Quantal Quetzal Edit (6.0 KiB, t

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

refer to your patch

can r61i use dock station or port replicator?
 there is mic at sep (dock mic) but no dock line out in the codec info

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

if the driver implement auto mic selection. those mic capture switch is meaningless

Node 0x1a [Audio Input] wcaps 0x100d0b: Stereo Amp-In R/L
  Control: name="Dock Mic Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=2, ofs=0
  Control: name="Dock Mic Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=2, ofs=0
  Control: name="Mic Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=1, ofs=0
  Control: name="Mic Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=1, ofs=0
  Control: name="Internal Mic Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=4, ofs=0
  Control: name="Internal Mic Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=4, ofs=0
  Device: name="CONEXANT Analog", type="Audio", device=0
  Amp-In caps: ofs=0x00, nsteps=0x17, stepsize=0x05, mute=1
  Amp-In vals: [0x80 0x80] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
  Converter: stream=1, channel=0
  SDI-Select: 0
  Power states: D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 5
     0x17 0x14 0x12 0x11 0x15*

Changed in alsa-driver (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
c4pp4 (c4pp4) wrote :

"node 0x17 is the analog mixer silmilar to ac97 analog mixer"

"you lost the mic playback volume controls and 12 dB gain of hardware PCM playback volume"

@Raymond
Thank you very much for the clarification.

Revision history for this message
c4pp4 (c4pp4) wrote :

I've updated the driver for both Ubuntu 12.04 and 12.10. There is no click noise anymore.

summary: - Lenovo sound chip Conexant CX20549 Venice doesn't work correctly.
+ [Thinkpad R61i] Lenovo sound chip Conexant CX20549 Venice doesn't work
+ correctly.
summary: - [Thinkpad R61i] Lenovo sound chip Conexant CX20549 Venice doesn't work
- correctly.
+ [Thinkpad R61i/T61] Lenovo sound chip Conexant CX20549 Venice doesn't
+ work correctly.
Revision history for this message
David Henningsson (diwic) wrote :

Hi c4pp4 and first of all, thanks for your endurance with this issue.

To have this fixed once and for all, we need to get this into upstream. Based on your comments, I'm trying to figure out which pieces make sense to send to upstream. Your code is based on making a new "model" which is a way we're trying to move away from, so therefore it should not be upstreamed as it is.

It looks to me as the latest thing you have been working with relates to turning the speaker pin into D3 before turning off its output control, and this prevents clicking. Are there other issues remaining with the standard driver, or is this the only remaining one?

Revision history for this message
David Henningsson (diwic) wrote :

I've rewritten the part of your patch that fixes the click so that it looks more like upstream would want it (I believe).
Could you help testing it? If it works, I will send this version to upstream for inclusion.

It should be applied to the daily DKMS builds. If you like, I can make a custom DKMS with this applied - if so, please tell me which Ubuntu version you would like it for.

Thanks in advance!

Changed in alsa-driver (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
jhoechtl (johann-hoechtl) wrote :

What is required to get this into mainstream and nail it down forever? (Or is upstream = mainstream = vanilla linux kernel maintained by Linus?)

Revision history for this message
David Henningsson (diwic) wrote :

@jhoectl, with upstream I mean the vanilla linux kernel maintained by Linus.

Revision history for this message
c4pp4 (c4pp4) wrote :

@David Henningsson

Hi, thanks for your effort,

I've tried that patch and with a little correction it works as expected - no more click noise.
It's necessary to move the line
.reboot_notify = conexant_reboot_notify,
from
static const struct hda_codec_ops conexant_patch_ops = {
to
static const struct hda_codec_ops cx_auto_patch_ops = {
when rebooting "auto model detection".

One thing about
snd_hda_codec_set_power_to_all(codec, codec->afg, AC_PWRST_D3, false);
I think it's not necessary to turning every single pin to D3, just pin for the Speaker, like this
snd_hda_codec_write(codec, 0x10, 0, AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
or
snd_hda_codec_write(codec, codec->start_nid, 0, AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
but it's up to you because it works :)

The rest regressions when using "auto model detection":
1) There is a wrong AC_VERB_SET_CONNECT_SEL setting. Speaker 0x10 and Headphones 0x11 (and maybe dock station 0x12) are connected to Audio Output 0x19 instead of Audio Mixer 0x17. Look at post #8.
2) I don't know how to explain it but there is a wrong PCM level. Sound output is muted in the "0% <-> unamplified" part of the volume slider and is working in the "unamplified <-> 100% ->" part only and it's annoying; according to the code from patch_conexant.c (old model setting)
 switch (codec->subsystem_id >> 16) {
 case 0x103c:
 case 0x1631:
 case 0x1734:
 case 0x17aa:
  /* HP, Packard Bell, Fujitsu-Siemens & Lenovo laptops have
   * really bad sound over 0dB on NID 0x17. Fix max PCM level to
   * 0 dB (originally it has 0x2b steps with 0dB offset 0x14)
   */
  snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT,
       (0x14 << AC_AMPCAP_OFFSET_SHIFT) |
       (0x14 << AC_AMPCAP_NUM_STEPS_SHIFT) |
       (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
       (1 << AC_AMPCAP_MUTE_SHIFT));
  break;
 }
the driver doesn't allow amplified part because sound is distorted over 0dB of the PCM level so there is no need amplified part of the volume slider.

Revision history for this message
David Henningsson (diwic) wrote :

> It's necessary to move the line .reboot_notify = conexant_reboot_notify,
> from static const struct hda_codec_ops conexant_patch_ops = {
> to static const struct hda_codec_ops cx_auto_patch_ops = {

Good catch! Fixed.

> snd_hda_codec_set_power_to_all(codec, codec->afg, AC_PWRST_D3, false);
> I think it's not necessary to turning every single pin to D3, just pin for the Speaker, like this
> snd_hda_codec_write(codec, 0x10, 0, AC_VERB_SET_POWER_STATE, AC_PWRST_D3);

I guess it doesn't matter much. All pins get set to D3 afterwards anyway, so as long as this implementation does not cause regressions anywhere, I'll try this first out of simplicity.

> 1) There is a wrong AC_VERB_SET_CONNECT_SEL setting. Speaker 0x10 and Headphones 0x11 (and maybe dock station 0x12)
> are connected to Audio Output 0x19 instead of Audio Mixer 0x17.

I don't think this is a bug. The 0x17 node is not used because there is a more direct path ( 0x19 -> 0x10 instead of 0x19 -> 0x17 -> 0x10 ). In some codecs, not using the mixer node gives slightly better audio quality, so therefore we use this strategy by default.

Is it causing any practical problems for you?

> 2) I don't know how to explain it but there is a wrong PCM level. Sound output is muted in the "0% <-> unamplified" part of the
> volume slider and is working in the "unamplified <-> 100% ->" part only and it's annoying;

When you move the slider in the GUI, that in turns modifies sliders at the ALSA level. As far as I can see, this corresponds to a "Speaker" and a "Master" slider, or "Headphones" and "Master" if you have headphones plugged in. Start "alsamixer" in a terminal. (see https://wiki.ubuntu.com/Audio/Alsamixer for keys you can use.) Fiddle around with this, i e, move the slider in the sound settings GUI and see the alsamixer GUI bars moving. Or change things in the alsamixer GUI and notice what results it has on the actual output volume.

It seems to me like either of the "Speaker" or "Master" sliders are not working properly, or maybe "Headphones" control Speakers or something otherwise strange here. Maybe you can figure it out?

Revision history for this message
David Henningsson (diwic) wrote : [PATCH] ALSA: hda - Fix clicking noise on Thinkpad T61/R61i
Download full text (3.5 KiB)

The bug reporter reports that setting the speaker pin to
D3 before turning off its pinctl fixes the clicking noise on
powersave for Thinkpad T61.

Thanks to c4pp4 for doing most of the work with this bug, including
reporting and testing, and writing preliminary patches.

BugLink: https://bugs.launchpad.net/bugs/886975
Signed-off-by: David Henningsson <email address hidden>
---
 sound/pci/hda/patch_conexant.c | 36 ++++++++++++++++++++++++++++++++----
 1 file changed, 32 insertions(+), 4 deletions(-)

Note: c4pp4 pointed out that in his case, only the speaker needed to go to
D3 before pinctl, but noticed no regressions from the below implementation,
so I made the fixup more generic (easier to reuse later).

diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index a3a2263..27e6ca7 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -144,6 +144,7 @@ struct conexant_spec {
  unsigned int asus:1;
  unsigned int pin_eapd_ctrls:1;
  unsigned int fixup_stereo_dmic:1;
+ unsigned int d3_before_shutup:1; /* Needs speaker to go to D3 before pinctl */

  unsigned int adc_switching:1;

@@ -558,13 +559,22 @@ static int conexant_build_controls(struct hda_codec *codec)
  return 0;
 }

-#ifdef CONFIG_PM
 static int conexant_suspend(struct hda_codec *codec)
 {
+ struct conexant_spec *spec = codec->spec;
+
+ if (spec->d3_before_shutup)
+ snd_hda_codec_set_power_to_all(codec, codec->afg, AC_PWRST_D3,
+ false);
  snd_hda_shutup_pins(codec);
  return 0;
 }
-#endif
+
+static void conexant_reboot_notify(struct hda_codec *codec)
+{
+ conexant_suspend(codec);
+}
+

 static const struct hda_codec_ops conexant_patch_ops = {
  .build_controls = conexant_build_controls,
@@ -575,7 +585,7 @@ static const struct hda_codec_ops conexant_patch_ops = {
 #ifdef CONFIG_PM
  .suspend = conexant_suspend,
 #endif
- .reboot_notify = snd_hda_shutup_pins,
+ .reboot_notify = conexant_reboot_notify,
 };

 #ifdef CONFIG_SND_HDA_INPUT_BEEP
@@ -4408,7 +4418,7 @@ static const struct hda_codec_ops cx_auto_patch_ops = {
 #ifdef CONFIG_PM
  .suspend = conexant_suspend,
 #endif
- .reboot_notify = snd_hda_shutup_pins,
+ .reboot_notify = conexant_reboot_notify,
 };

 /*
@@ -4421,6 +4431,7 @@ enum {
  CXT_PINCFG_LEMOTE_A1205,
  CXT_FIXUP_STEREO_DMIC,
  CXT_FIXUP_INC_MIC_BOOST,
+ CXT_FIXUP_D3_BEFORE_SHUTUP,
 };

 static void cxt_fixup_stereo_dmic(struct hda_codec *codec,
@@ -4430,6 +4441,13 @@ static void cxt_fixup_stereo_dmic(struct hda_codec *codec,
  spec->fixup_stereo_dmic = 1;
 }

+static void cxt_fixup_d3_before_shutup(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ struct conexant_spec *spec = codec->spec;
+ spec->d3_before_shutup = 1;
+}
+
 static void cxt5066_increase_mic_boost(struct hda_codec *codec,
        const struct hda_fixup *fix, int action)
 {
@@ -4499,6 +4517,15 @@ static const struct hda_fixup cxt_fixups[] = {
   .type = HDA_FIXUP_FUNC,
   .v.func = cxt5066_increase_mic_boost,
  },
+ [CXT_FIXUP_D3_BEFORE_SHUTUP] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = cxt_fixup_d3_before_shutup,
+ },
+};
+
+static const struct snd_pci_quirk cxt5045_fixups[] = {
+ SND_PCI_QUIR...

Read more...

Revision history for this message
Takashi Iwai (tiwai) wrote :
Download full text (4.2 KiB)

At Wed, 12 Dec 2012 18:02:04 +0100,
David Henningsson wrote:
>
> The bug reporter reports that setting the speaker pin to
> D3 before turning off its pinctl fixes the clicking noise on
> powersave for Thinkpad T61.
>
> Thanks to c4pp4 for doing most of the work with this bug, including
> reporting and testing, and writing preliminary patches.
>
> BugLink: https://bugs.launchpad.net/bugs/886975
> Signed-off-by: David Henningsson <email address hidden>
> ---
> sound/pci/hda/patch_conexant.c | 36 ++++++++++++++++++++++++++++++++----
> 1 file changed, 32 insertions(+), 4 deletions(-)
>
> Note: c4pp4 pointed out that in his case, only the speaker needed to go to
> D3 before pinctl, but noticed no regressions from the below implementation,
> so I made the fixup more generic (easier to reuse later).

Well, if going to D3 is already achieved there, there is no point to
call snd_hda_shutup_pins(). snd_hda_shutup_pins() itself is for
reducing the click noise while the codec is going down to D3.

Thus, for this particular machine, simply disable
snd_hda_shutup_pins() call from suspend, and make D3 call in
reboot_notify.

Takashi

> diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
> index a3a2263..27e6ca7 100644
> --- a/sound/pci/hda/patch_conexant.c
> +++ b/sound/pci/hda/patch_conexant.c
> @@ -144,6 +144,7 @@ struct conexant_spec {
> unsigned int asus:1;
> unsigned int pin_eapd_ctrls:1;
> unsigned int fixup_stereo_dmic:1;
> + unsigned int d3_before_shutup:1; /* Needs speaker to go to D3 before pinctl */
>
> unsigned int adc_switching:1;
>
> @@ -558,13 +559,22 @@ static int conexant_build_controls(struct hda_codec *codec)
> return 0;
> }
>
> -#ifdef CONFIG_PM
> static int conexant_suspend(struct hda_codec *codec)
> {
> + struct conexant_spec *spec = codec->spec;
> +
> + if (spec->d3_before_shutup)
> + snd_hda_codec_set_power_to_all(codec, codec->afg, AC_PWRST_D3,
> + false);
> snd_hda_shutup_pins(codec);
> return 0;
> }
> -#endif
> +
> +static void conexant_reboot_notify(struct hda_codec *codec)
> +{
> + conexant_suspend(codec);
> +}
> +
>
> static const struct hda_codec_ops conexant_patch_ops = {
> .build_controls = conexant_build_controls,
> @@ -575,7 +585,7 @@ static const struct hda_codec_ops conexant_patch_ops = {
> #ifdef CONFIG_PM
> .suspend = conexant_suspend,
> #endif
> - .reboot_notify = snd_hda_shutup_pins,
> + .reboot_notify = conexant_reboot_notify,
> };
>
> #ifdef CONFIG_SND_HDA_INPUT_BEEP
> @@ -4408,7 +4418,7 @@ static const struct hda_codec_ops cx_auto_patch_ops = {
> #ifdef CONFIG_PM
> .suspend = conexant_suspend,
> #endif
> - .reboot_notify = snd_hda_shutup_pins,
> + .reboot_notify = conexant_reboot_notify,
> };
>
> /*
> @@ -4421,6 +4431,7 @@ enum {
> CXT_PINCFG_LEMOTE_A1205,
> CXT_FIXUP_STEREO_DMIC,
> CXT_FIXUP_INC_MIC_BOOST,
> + CXT_FIXUP_D3_BEFORE_SHUTUP,
> };
>
> static void cxt_fixup_stereo_dmic(struct hda_codec *codec,
> @@ -4430,6 +4441,13 @@ static void cxt_fixup_stereo_dmic(struct hda_codec *codec,
> spec->fixup_stereo_dmic = 1;
> }
>
> +static void cxt_fixup_d3_before_shutup(struct hda_codec *codec,
> + ...

Read more...

Revision history for this message
c4pp4 (c4pp4) wrote :

@David Henningsson

Ok, it seems to me as a good joke :D

At first there was a problem with initial click noise when on battery power according to this:
https://bugzilla.novell.com/show_bug.cgi?id=624896

Then they patched the conexant driver without any confirmation that it's resolving the issue:
http://git.alsa-project.org/?p=alsa-kernel.git;a=commit;h=697c373e34613609cb5450f98b91fefb6e910588

The patch in fact caused click noise hell because the initial click noise is still alive and in addition there were born new click noises, louder click noise and double click noise. They start to appear when using power-save mode, when suspending computer and when rebooting computer.

I'll try to put down that initial click noise and let you know.

Revision history for this message
aovacik (aovacik) wrote :

Hello , I am having the same microphone problem, neither external or internal microphone works under linux. running ubuntu 12-04 LTS on Lenovo Ideapad N585

Should i give this patch a try ? My Laptop does not seem to have the same device though

lspci -vnn | grep -A1 Audio
00:01.1 Audio device [0403]: Advanced Micro Devices [AMD] nee ATI Wrestler HDMI Audio [Radeon HD 6250/6310] [1002:1314]
 Subsystem: Lenovo Device [17aa:397f]
--
00:14.2 Audio device [0403]: Advanced Micro Devices [AMD] Hudson Azalia Controller [1022:780d] (rev 01)
 Subsystem: Lenovo Device [17aa:397f]

Revision history for this message
David Henningsson (diwic) wrote :

c4pp4, okay, let me know if you find anything. But if reverting the commit that caused the extra clicks causes no other regressions then we should probably revert it as a first step, and after that see if you can find a way to avoid the initial click too?

Revision history for this message
c4pp4 (c4pp4) wrote :

@David Henningsson

Yes, you are right, that's exactly what I'm doing. I've made a module without snd_hda_shutup_pins() solution and there is only that initial click noise now.

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

try mute the amp out VAL of connection from 0x17 in node 0x10 if node 0x17 is not used

Node 0x10 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Speaker Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x2b, nsteps=0x2b, stepsize=0x05, mute=1
  Amp-Out vals: [0x20 0x20] [0x00 0x00]
  Pincap 0x00010014: OUT EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x95170110: [Fixed] Speaker at Int Top
    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
  Power: setting=D0, actual=D0
  Connection: 2
     0x19* 0x17

Revision history for this message
David Henningsson (diwic) wrote :

On 12/12/2012 06:15 PM, Takashi Iwai wrote:
> At Wed, 12 Dec 2012 18:02:04 +0100,
> David Henningsson wrote:
>>
>> The bug reporter reports that setting the speaker pin to
>> D3 before turning off its pinctl fixes the clicking noise on
>> powersave for Thinkpad T61.
>>
>> Thanks to c4pp4 for doing most of the work with this bug, including
>> reporting and testing, and writing preliminary patches.
>>
>> BugLink: https://bugs.launchpad.net/bugs/886975
>> Signed-off-by: David Henningsson <email address hidden>
>> ---
>> sound/pci/hda/patch_conexant.c | 36 ++++++++++++++++++++++++++++++++----
>> 1 file changed, 32 insertions(+), 4 deletions(-)
>>
>> Note: c4pp4 pointed out that in his case, only the speaker needed to go to
>> D3 before pinctl, but noticed no regressions from the below implementation,
>> so I made the fixup more generic (easier to reuse later).
>
> Well, if going to D3 is already achieved there, there is no point to
> call snd_hda_shutup_pins(). snd_hda_shutup_pins() itself is for
> reducing the click noise while the codec is going down to D3.
>
> Thus, for this particular machine, simply disable
> snd_hda_shutup_pins() call from suspend, and make D3 call in
> reboot_notify.

Looking at the bug report, c4pp4 has just reported back that reverting
the old commit 697c373e34613609cb5 improves the situation - there are
less clicks compared to the current situation.

Quoting c4pp4 below:

"The patch [697c373e34613609cb5] in fact caused click noise hell because
the initial click noise is still alive and in addition there were born
new click noises, louder click noise and double click noise. They start
to appear when using power-save mode, when suspending computer and when
rebooting computer."

So maybe revert that patch?

--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

Revision history for this message
Takashi Iwai (tiwai) wrote :

At Mon, 17 Dec 2012 16:33:10 +0100,
David Henningsson wrote:
>
> On 12/12/2012 06:15 PM, Takashi Iwai wrote:
> > At Wed, 12 Dec 2012 18:02:04 +0100,
> > David Henningsson wrote:
> >>
> >> The bug reporter reports that setting the speaker pin to
> >> D3 before turning off its pinctl fixes the clicking noise on
> >> powersave for Thinkpad T61.
> >>
> >> Thanks to c4pp4 for doing most of the work with this bug, including
> >> reporting and testing, and writing preliminary patches.
> >>
> >> BugLink: https://bugs.launchpad.net/bugs/886975
> >> Signed-off-by: David Henningsson <email address hidden>
> >> ---
> >> sound/pci/hda/patch_conexant.c | 36 ++++++++++++++++++++++++++++++++----
> >> 1 file changed, 32 insertions(+), 4 deletions(-)
> >>
> >> Note: c4pp4 pointed out that in his case, only the speaker needed to go to
> >> D3 before pinctl, but noticed no regressions from the below implementation,
> >> so I made the fixup more generic (easier to reuse later).
> >
> > Well, if going to D3 is already achieved there, there is no point to
> > call snd_hda_shutup_pins(). snd_hda_shutup_pins() itself is for
> > reducing the click noise while the codec is going down to D3.
> >
> > Thus, for this particular machine, simply disable
> > snd_hda_shutup_pins() call from suspend, and make D3 call in
> > reboot_notify.
>
> Looking at the bug report, c4pp4 has just reported back that reverting
> the old commit 697c373e34613609cb5 improves the situation - there are
> less clicks compared to the current situation.
>
> Quoting c4pp4 below:
>
> "The patch [697c373e34613609cb5] in fact caused click noise hell because
> the initial click noise is still alive and in addition there were born
> new click noises, louder click noise and double click noise. They start
> to appear when using power-save mode, when suspending computer and when
> rebooting computer."
>
> So maybe revert that patch?

Yes, feel free to submit the patch.

Takashi

Revision history for this message
David Henningsson (diwic) wrote : [PATCH] Revert "ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs"

This reverts commit 697c373e34613609cb5450f98b91fefb6e910588.

The original patch was meant to remove clicking, but in fact caused even
more clicking instead.

Thanks to c4pp4 for doing most of the work with this bug.

BugLink: https://bugs.launchpad.net/bugs/886975
Signed-off-by: David Henningsson <email address hidden>
---

@c4pp4: Is this consistent with what you have done to reduce the clicking?
Will you recommend upstream Linux to take the patch below?

 sound/pci/hda/patch_conexant.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 60890bf..dd798c3 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -558,24 +558,12 @@ static int conexant_build_controls(struct hda_codec *codec)
  return 0;
 }

-#ifdef CONFIG_PM
-static int conexant_suspend(struct hda_codec *codec)
-{
- snd_hda_shutup_pins(codec);
- return 0;
-}
-#endif
-
 static const struct hda_codec_ops conexant_patch_ops = {
  .build_controls = conexant_build_controls,
  .build_pcms = conexant_build_pcms,
  .init = conexant_init,
  .free = conexant_free,
  .set_power_state = conexant_set_power,
-#ifdef CONFIG_PM
- .suspend = conexant_suspend,
-#endif
- .reboot_notify = snd_hda_shutup_pins,
 };

 #ifdef CONFIG_SND_HDA_INPUT_BEEP
@@ -4405,10 +4393,6 @@ static const struct hda_codec_ops cx_auto_patch_ops = {
  .init = cx_auto_init,
  .free = conexant_free,
  .unsol_event = snd_hda_jack_unsol_event,
-#ifdef CONFIG_PM
- .suspend = conexant_suspend,
-#endif
- .reboot_notify = snd_hda_shutup_pins,
 };

 /*
--
1.7.9.5

Revision history for this message
Takashi Iwai (tiwai) wrote :

At Wed, 19 Dec 2012 09:44:47 +0100,
David Henningsson wrote:
>
> This reverts commit 697c373e34613609cb5450f98b91fefb6e910588.
>
> The original patch was meant to remove clicking, but in fact caused even
> more clicking instead.
>
> Thanks to c4pp4 for doing most of the work with this bug.
>
> BugLink: https://bugs.launchpad.net/bugs/886975
> Signed-off-by: David Henningsson <email address hidden>
> ---
>
> @c4pp4: Is this consistent with what you have done to reduce the clicking?
> Will you recommend upstream Linux to take the patch below?

So, it shouldn't be merged yet right now?
Now is the last chance for merging it to 3.8-rc1.

Takashi

>
> sound/pci/hda/patch_conexant.c | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
> index 60890bf..dd798c3 100644
> --- a/sound/pci/hda/patch_conexant.c
> +++ b/sound/pci/hda/patch_conexant.c
> @@ -558,24 +558,12 @@ static int conexant_build_controls(struct hda_codec *codec)
> return 0;
> }
>
> -#ifdef CONFIG_PM
> -static int conexant_suspend(struct hda_codec *codec)
> -{
> - snd_hda_shutup_pins(codec);
> - return 0;
> -}
> -#endif
> -
> static const struct hda_codec_ops conexant_patch_ops = {
> .build_controls = conexant_build_controls,
> .build_pcms = conexant_build_pcms,
> .init = conexant_init,
> .free = conexant_free,
> .set_power_state = conexant_set_power,
> -#ifdef CONFIG_PM
> - .suspend = conexant_suspend,
> -#endif
> - .reboot_notify = snd_hda_shutup_pins,
> };
>
> #ifdef CONFIG_SND_HDA_INPUT_BEEP
> @@ -4405,10 +4393,6 @@ static const struct hda_codec_ops cx_auto_patch_ops = {
> .init = cx_auto_init,
> .free = conexant_free,
> .unsol_event = snd_hda_jack_unsol_event,
> -#ifdef CONFIG_PM
> - .suspend = conexant_suspend,
> -#endif
> - .reboot_notify = snd_hda_shutup_pins,
> };
>
> /*
> --
> 1.7.9.5
>

Revision history for this message
David Henningsson (diwic) wrote :

On 12/19/2012 11:24 AM, Takashi Iwai wrote:
> At Wed, 19 Dec 2012 09:44:47 +0100,
> David Henningsson wrote:
>>
>> This reverts commit 697c373e34613609cb5450f98b91fefb6e910588.
>>
>> The original patch was meant to remove clicking, but in fact caused even
>> more clicking instead.
>>
>> Thanks to c4pp4 for doing most of the work with this bug.
>>
>> BugLink: https://bugs.launchpad.net/bugs/886975
>> Signed-off-by: David Henningsson <email address hidden>
>> ---
>>
>> @c4pp4: Is this consistent with what you have done to reduce the clicking?
>> Will you recommend upstream Linux to take the patch below?
>
> So, it shouldn't be merged yet right now?
> Now is the last chance for merging it to 3.8-rc1.

If we don't have time waiting for c4pp4's confirmation without missing
the entire 3.8 cycle, then I think we should merge it.

--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

Revision history for this message
Takashi Iwai (tiwai) wrote :

At Wed, 19 Dec 2012 11:34:46 +0100,
David Henningsson wrote:
>
> On 12/19/2012 11:24 AM, Takashi Iwai wrote:
> > At Wed, 19 Dec 2012 09:44:47 +0100,
> > David Henningsson wrote:
> >>
> >> This reverts commit 697c373e34613609cb5450f98b91fefb6e910588.
> >>
> >> The original patch was meant to remove clicking, but in fact caused even
> >> more clicking instead.
> >>
> >> Thanks to c4pp4 for doing most of the work with this bug.
> >>
> >> BugLink: https://bugs.launchpad.net/bugs/886975
> >> Signed-off-by: David Henningsson <email address hidden>
> >> ---
> >>
> >> @c4pp4: Is this consistent with what you have done to reduce the clicking?
> >> Will you recommend upstream Linux to take the patch below?
> >
> > So, it shouldn't be merged yet right now?
> > Now is the last chance for merging it to 3.8-rc1.
>
> If we don't have time waiting for c4pp4's confirmation without missing
> the entire 3.8 cycle, then I think we should merge it.

It's no new feature, so it's fine to merge it at any time during 3.8
cycle, even after 3.8-rc1.

But such a fix should be merged with Cc to stable, so a bit more tests
would be better.

Takashi

Revision history for this message
c4pp4 (c4pp4) wrote :

@David Henningsson

Yes, reverting back to state without snd_hda_shutup_pins() reduce click noises. After that there is just the initial click noise when on battery power. I'm almost done with avoiding that initial click noise. It'll be finished as soon as possible.

Revision history for this message
David Henningsson (diwic) wrote :

@c4pp4, thanks for your reply.

Revision history for this message
David Henningsson (diwic) wrote :

Oops, wanted to write something more in that comment:

If you like, you can join the discussion I'm having with upstream (cc:ed into this bug). All I need is your email address to cc you in and you can discuss with Takashi (the upstream maintainer) and me directly.

Revision history for this message
c4pp4 (c4pp4) wrote :

@David Henningsson

If it's not necessary to join the upstream discussion I'd like to stay over here if you don't mind.

After putting down that initial click noise I discovered a new one and that's why the solution avoids two sorts of click noise. Both had been appearing within the transition to D0. The first one (the initial click noise) was caused by the eapd workaround - not powering down the speaker 0x10 widget within the transition to D3. The second one is quite soft and that's why I didn't noticed it before. It was caused by the small transition time to power up the AFG. It had been appearing at the same time as the initial click noise as well as after the reboot (when on battery power). I read the hda specification and successfully tried to use 75ms delay according to hda specification - "It is permissible for the audio fidelity for analog outputs to be slightly degraded if audio rendering begins immediately once the fully operational state is entered. However, audio fidelity must not be degraded 75ms after the transitioning to D0 state." Now there is no click noise with one exception - when I try to record from D3 state there is a recorded click. I tried to avoid that recorded click but the solution is in extending the time to power up the AFG up to 300ms instead of 75ms. But I think it's too long because the start of sound output is lagging. What do you think about it?

Commentary:
the source is from dkms-hda_0.201212172004~quantal1
---------------------------
patch_conexant.c
---------------------------
+ * Copyright (c) 2006 Pototskiy Alex <email address hidden>
just a typo

+ snd_hda_codec_set_power_to_all(codec, fg, power_state, false);
when transitioning to D3 set eapd_workaround to false because we need to power down the widget - Speaker 0x10, if it's not set it causes the initial click noise

+ msleep(75);
time to power up the AFG to avoid the soft click noise

+ .set_power_state = conexant_set_power,
use conexant power settings for auto model

----------------------
hda_codec.c
----------------------
+ hda_set_power_state(codec, AC_PWRST_D0);
(when on battery power) power up the AFG to avoid the soft click noise when rebooting

Would you rewrite it into the "upstream style"?
Thank you.

Revision history for this message
c4pp4 (c4pp4) wrote :

@David Henningsson

GUI Sliders DEMO:
- unamplified part bug
- no control of mic bug

http://youtu.be/AZTcPCGejoA

- better to use flash version with quality 720p
- html5 version has bad annotations

I think that solution with unaplified part is AC_VERB_SET_CONNECT_SEL to Audio Mixer (0x10 -> 0x17, 0x11 -> 0x17) instead of Audio Output ( 0x10 -> 0x19, 0x11 -> 0x19) and override the setting of 0x17 Amp-In Caps by snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT, (0x14 << AC_AMPCAP_OFFSET_SHIFT) | (0x14 << AC_AMPCAP_NUM_STEPS_SHIFT) | (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) | (1 << AC_AMPCAP_MUTE_SHIFT));

Revision history for this message
c4pp4 (c4pp4) wrote :

@David Henningsson

To resolve the unamplified part bug I changed TLV data for a virtual master volume:

tlv[2] = -nums * step;
tlv[3] = step;

new values:
tlv[2] = -6450;
tlv[3] = 150;

Originally the range of the master volume is from 0db to 10.75db with step 0.25.
After the change the range is from -64.50db to 0db with step 1.50. Now there is no unamplified mark and the slider works all over the length.

-------------------------------------------------------

To resolve the mic control bug I followed your workaround:
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/946232/comments/32
"For those of you who are missing an internal mic port, edit /usr/share/pulseaudio/alsa-mixer/paths/analog-input-internal-mic.conf and comment out all lines that start with "required-any"."

Revision history for this message
c4pp4 (c4pp4) wrote :
Revision history for this message
David Henningsson (diwic) wrote :

c4pp4, thanks for your work so far. FYI, I'll be back from holiday at 2nd of Jan 2013. (And depending on workload, might be a few days extra until I'll have time to look at your patches)

Revision history for this message
c4pp4 (c4pp4) wrote :

@David Henningsson

Take your time, happy Holidays.

Revision history for this message
David Henningsson (diwic) wrote :

Ok, back. It is easier to try to examine the clicks one at a time. So in priority order, is this correct:

1) The biggest clicks are fixed by the patch in comment #71

2) To second click needs these two to fix:
+ snd_hda_codec_set_power_to_all(codec, fg, power_state, false);
when transitioning to D3 set eapd_workaround to false because we need to power down the widget - Speaker 0x10, if it's not set it causes the initial click noise
+ .set_power_state = conexant_set_power,
use conexant power settings for auto model

3) For the soft click when powering up, have you tried anything between 10 and 75 to see if that also resolves the click? I'm thinking that we should not set a higher latency than absolutely necessary. (And I agree that 300 would likely be too much, better live with the recorded click.)

Revision history for this message
c4pp4 (c4pp4) wrote :

1) Right.

2) Right.

3) Yes, I have. I guess the number 75 is just a compromise because the click noise is still there but it's hardly audible = more time less audible.
+ msleep(75);
+ else
+ hda_set_power_state(codec, AC_PWRST_D0);

4) GUI Master Volume slider:
+ vmaster_tlv[2] = -6450;
+ vmaster_tlv[3] = 150;

5) GUI Input Volume slider
/usr/share/pulseaudio/alsa-mixer/paths/analog-input-internal-mic.conf
#required-any

Revision history for this message
David Henningsson (diwic) wrote :

On 12/19/2012 11:38 AM, Takashi Iwai wrote:
> At Wed, 19 Dec 2012 11:34:46 +0100,
> David Henningsson wrote:
>>
>> On 12/19/2012 11:24 AM, Takashi Iwai wrote:
>>> At Wed, 19 Dec 2012 09:44:47 +0100,
>>> David Henningsson wrote:
>>>>
>>>> This reverts commit 697c373e34613609cb5450f98b91fefb6e910588.
>>>>
>>>> The original patch was meant to remove clicking, but in fact caused even
>>>> more clicking instead.
>>>>
>>>> Thanks to c4pp4 for doing most of the work with this bug.
>>>>
>>>> BugLink: https://bugs.launchpad.net/bugs/886975
>>>> Signed-off-by: David Henningsson <email address hidden>
>>>> ---
>>>>
>>>> @c4pp4: Is this consistent with what you have done to reduce the clicking?
>>>> Will you recommend upstream Linux to take the patch below?
>>>
>>> So, it shouldn't be merged yet right now?
>>> Now is the last chance for merging it to 3.8-rc1.
>>
>> If we don't have time waiting for c4pp4's confirmation without missing
>> the entire 3.8 cycle, then I think we should merge it.
>
> It's no new feature, so it's fine to merge it at any time during 3.8
> cycle, even after 3.8-rc1.
>
> But such a fix should be merged with Cc to stable, so a bit more tests
> would be better.

Do you have a suggestion on how that should be tested? I have no
conexant machines here currently.

--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

Revision history for this message
Takashi Iwai (tiwai) wrote :

At Thu, 03 Jan 2013 17:04:15 +0100,
David Henningsson wrote:
>
> On 12/19/2012 11:38 AM, Takashi Iwai wrote:
> > At Wed, 19 Dec 2012 11:34:46 +0100,
> > David Henningsson wrote:
> >>
> >> On 12/19/2012 11:24 AM, Takashi Iwai wrote:
> >>> At Wed, 19 Dec 2012 09:44:47 +0100,
> >>> David Henningsson wrote:
> >>>>
> >>>> This reverts commit 697c373e34613609cb5450f98b91fefb6e910588.
> >>>>
> >>>> The original patch was meant to remove clicking, but in fact caused even
> >>>> more clicking instead.
> >>>>
> >>>> Thanks to c4pp4 for doing most of the work with this bug.
> >>>>
> >>>> BugLink: https://bugs.launchpad.net/bugs/886975
> >>>> Signed-off-by: David Henningsson <email address hidden>
> >>>> ---
> >>>>
> >>>> @c4pp4: Is this consistent with what you have done to reduce the clicking?
> >>>> Will you recommend upstream Linux to take the patch below?
> >>>
> >>> So, it shouldn't be merged yet right now?
> >>> Now is the last chance for merging it to 3.8-rc1.
> >>
> >> If we don't have time waiting for c4pp4's confirmation without missing
> >> the entire 3.8 cycle, then I think we should merge it.
> >
> > It's no new feature, so it's fine to merge it at any time during 3.8
> > cycle, even after 3.8-rc1.
> >
> > But such a fix should be merged with Cc to stable, so a bit more tests
> > would be better.
>
> Do you have a suggestion on how that should be tested? I have no
> conexant machines here currently.

Well, at best, test 3.8-rc2 with the patch. The content isn't too
intrusive so it should suffice for merge. Alternatively, the tester
can try older kernel with the same patch.

The point is to confirm that the patch really works.

thanks,

Takashi

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

> fix-master.patch

does the virtual master really work on CD20549 since

spec->vmaster_nid = spec->private_dac_nids[0];

in cx_auto_parse_output

but the volume control are at pin complex instead of audio output (DAC)

Revision history for this message
David Henningsson (diwic) wrote :

@Raymond, I think your observation in comment #88 is correct, would you mind writing a patch for that, or do you want me to do it?

Revision history for this message
David Henningsson (diwic) wrote :

@c4pp4:

Still trying to get 1) through upstream...

The following dkms package contains patch for 1) only, on top of git master. Can you just install it, reboot, and make sure that the 1) click is gone. Thanks.

Revision history for this message
David Henningsson (diwic) wrote :
Revision history for this message
c4pp4 (c4pp4) wrote :

@David Henningsson

Would you please make a package for the release 12.10 (quantal) 32-bit - kernel linux 3.5.0-21-generic?

Revision history for this message
David Henningsson (diwic) wrote :

Here it is, based on Takashi's for-linus branch

Revision history for this message
c4pp4 (c4pp4) wrote :

I can confirm that the 1) clicks are gone by the attached package.

Revision history for this message
David Henningsson (diwic) wrote :

On 01/04/2013 09:49 AM, Takashi Iwai wrote:
> At Thu, 03 Jan 2013 17:04:15 +0100,
> David Henningsson wrote:
>>
>> On 12/19/2012 11:38 AM, Takashi Iwai wrote:
>>> At Wed, 19 Dec 2012 11:34:46 +0100,
>>> David Henningsson wrote:
>>>>
>>>> On 12/19/2012 11:24 AM, Takashi Iwai wrote:
>>>>> At Wed, 19 Dec 2012 09:44:47 +0100,
>>>>> David Henningsson wrote:
>>>>>>
>>>>>> This reverts commit 697c373e34613609cb5450f98b91fefb6e910588.
>>>>>>
>>>>>> The original patch was meant to remove clicking, but in fact caused even
>>>>>> more clicking instead.
>>>>>>
>>>>>> Thanks to c4pp4 for doing most of the work with this bug.
>>>>>>
>>>>>> BugLink: https://bugs.launchpad.net/bugs/886975
>>>>>> Signed-off-by: David Henningsson <email address hidden>
>>>>>> ---
>>>>>>
>>>>>> @c4pp4: Is this consistent with what you have done to reduce the clicking?
>>>>>> Will you recommend upstream Linux to take the patch below?
>>>>>
>>>>> So, it shouldn't be merged yet right now?
>>>>> Now is the last chance for merging it to 3.8-rc1.
>>>>
>>>> If we don't have time waiting for c4pp4's confirmation without missing
>>>> the entire 3.8 cycle, then I think we should merge it.
>>>
>>> It's no new feature, so it's fine to merge it at any time during 3.8
>>> cycle, even after 3.8-rc1.
>>>
>>> But such a fix should be merged with Cc to stable, so a bit more tests
>>> would be better.
>>
>> Do you have a suggestion on how that should be tested? I have no
>> conexant machines here currently.
>
> Well, at best, test 3.8-rc2 with the patch. The content isn't too
> intrusive so it should suffice for merge. Alternatively, the tester
> can try older kernel with the same patch.
>
> The point is to confirm that the patch really works.

This has now been confirmed by c4pp4. Please commit the patch.

--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

Revision history for this message
Takashi Iwai (tiwai) wrote :

At Wed, 09 Jan 2013 09:36:24 +0100,
David Henningsson wrote:
>
> On 01/04/2013 09:49 AM, Takashi Iwai wrote:
> > At Thu, 03 Jan 2013 17:04:15 +0100,
> > David Henningsson wrote:
> >>
> >> On 12/19/2012 11:38 AM, Takashi Iwai wrote:
> >>> At Wed, 19 Dec 2012 11:34:46 +0100,
> >>> David Henningsson wrote:
> >>>>
> >>>> On 12/19/2012 11:24 AM, Takashi Iwai wrote:
> >>>>> At Wed, 19 Dec 2012 09:44:47 +0100,
> >>>>> David Henningsson wrote:
> >>>>>>
> >>>>>> This reverts commit 697c373e34613609cb5450f98b91fefb6e910588.
> >>>>>>
> >>>>>> The original patch was meant to remove clicking, but in fact caused even
> >>>>>> more clicking instead.
> >>>>>>
> >>>>>> Thanks to c4pp4 for doing most of the work with this bug.
> >>>>>>
> >>>>>> BugLink: https://bugs.launchpad.net/bugs/886975
> >>>>>> Signed-off-by: David Henningsson <email address hidden>
> >>>>>> ---
> >>>>>>
> >>>>>> @c4pp4: Is this consistent with what you have done to reduce the clicking?
> >>>>>> Will you recommend upstream Linux to take the patch below?
> >>>>>
> >>>>> So, it shouldn't be merged yet right now?
> >>>>> Now is the last chance for merging it to 3.8-rc1.
> >>>>
> >>>> If we don't have time waiting for c4pp4's confirmation without missing
> >>>> the entire 3.8 cycle, then I think we should merge it.
> >>>
> >>> It's no new feature, so it's fine to merge it at any time during 3.8
> >>> cycle, even after 3.8-rc1.
> >>>
> >>> But such a fix should be merged with Cc to stable, so a bit more tests
> >>> would be better.
> >>
> >> Do you have a suggestion on how that should be tested? I have no
> >> conexant machines here currently.
> >
> > Well, at best, test 3.8-rc2 with the patch. The content isn't too
> > intrusive so it should suffice for merge. Alternatively, the tester
> > can try older kernel with the same patch.
> >
> > The point is to confirm that the patch really works.
>
> This has now been confirmed by c4pp4. Please commit the patch.

OK, applied now.

Takashi

Revision history for this message
Luis Henriques (henrix) wrote :

This bug is awaiting verification that the kernel for Quantal in -proposed solves the problem (3.5.0-24.37). Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-quantal' to 'verification-done-quantal'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-quantal
c4pp4 (c4pp4)
tags: added: verification-done-quantal
removed: verification-needed-quantal
Revision history for this message
David Henningsson (diwic) wrote :

Hi c4pp4,

A while has passed and we fixed the worst click as mentioned in 1).

Meanwhile, a big rewrite of the HDA drivers has progressed and is now scheduled to reach kernel 3.9. I ran your codec against that code, and it seems like most of the stuff is fixed:

2) I think the click you mentioned is now fixed, but not sure
4) the master volume range bug is fixed
5) I'm a little confused about this one. It should be fixed in 3.9, but it should also already have been fixed in 12.10 actually.

You can read more about the rewrite here: http://voices.canonical.com/david.henningsson/2013/01/18/upcoming-changes-to-the-intel-hda-drivers/
And here's how to test these drivers: https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS

Revision history for this message
c4pp4 (c4pp4) wrote :

@David Henningsson

Great news, thank you!
Where can I find official patch for 2,4 and 5? What about number 3?

Revision history for this message
David Henningsson (diwic) wrote :

I think 3) is unchanged/remaining, but not sure.

The upstream tree to look at is: http://git.kernel.org/?p=linux/kernel/git/tiwai/sound.git;a=summary
I currently don't have time to scavenge this tree to find which patches fixes which issues.

Revision history for this message
c4pp4 (c4pp4) wrote :

I've tried a latest alsa-hda-dkms (Quantal up-to-date).
1) Fixed
2) Not fixed - I'm trying to find out where the problem is because there are a lot of changes in the source code.
3) I can't try it because of 2)
4) Fixed
5) Not fixed (in case that the fix should be applied by the alsa-hda-dkms package, furthermore I'm not sure what is the fix about)

Revision history for this message
c4pp4 (c4pp4) wrote :

Addition

2) Why it's not fixed:
There was a flag to not power down the widget if it controls eapd, it was called eapd_workaround and was set to true. I found out we need to set it to false to avoid the click #2 because when transitioning to D3 we need to power down the widget - Speaker 0x10 and it controls eapd. Now after changes there is no flag. EAPD part was separated to a new function default_power_filter without any flag to skip that. I've tried to add a new condition and the initial click noise vanished:

--- a/hda_codec.c
+++ b/hda_codec.c
@@ -3763,6 +3763,8 @@
       unsigned int power_state)
 {
  if (power_state == AC_PWRST_D3 &&
+ !((codec->vendor_id == 0x14f15045) &&
+ (codec->subsystem_id == 0x17aa20db)) &&
      get_wcaps_type(get_wcaps(codec, nid)) == AC_WID_PIN &&
      (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD)) {
   int eapd = snd_hda_codec_read(codec, nid, 0,

3) Now I can tell it's not fixed

Revision history for this message
David Henningsson (diwic) wrote :

Ok, thanks for the finding. If default_power_filter does not work, it seems most logical to override default_power_filter entirely, as has been done in this patch. Is this solving click 2) for you?

Revision history for this message
David Henningsson (diwic) wrote :

For 5) can we recap that a little? I understand the problem is that you don't have an input slider in the GUI, or that it doesn't control the gain? Or that Internal Mic does not show up at all?

Could you run the latest dkms, and attach alsa-info and a pulseaudio log (while the log is on, try to change the internal mic gain)?
https://wiki.ubuntu.com/Audio/AlsaInfo
https://wiki.ubuntu.com/PulseAudio/Log

Revision history for this message
c4pp4 (c4pp4) wrote :

2) Yes, it's solving it. ("codec->power_filter = NULL;" is avoiding the initial click noise when on battery power)

5)
Internal mic doesn't show up at all. Look at a screenshot here: http://ge.tt/2D2PuQY/v/0
I have to use your workaround to show it up: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/946232/comments/32
Alsainfo: http://www.alsa-project.org/db/?f=091359b9c86fff995dd99c915f5624fe16819f87
PulseAudio Log attached.

Revision history for this message
David Henningsson (diwic) wrote :

Thanks. I've discovered the problem for 5) - Ubuntu 12.10 is missing this patch:
http://bazaar.launchpad.net/~ubuntu-audio-dev/pulseaudio/ubuntu.precise/view/head:/debian/patches/0624-alsa-mixer-Add-Phantom-Jack-support.patch

I have no idea how I could have missed it for 12.10, I was 100% sure that it was added.

Revision history for this message
David Henningsson (diwic) wrote : [PATCH] ALSA: hda - Remove speaker clicks on CX20549

This chip needs the speaker pin to go to D3 to avoid clicks,
so default_power_filter does not work here.

This was found on Thinkpad R61i/T61i but I guess it applies to
the entire chip. If not, quirks should be set for at least
PCI SSID 17aa:20ac.

Thanks to c4pp4 for testing.

BugLink: https://bugs.launchpad.net/bugs/886975
Signed-off-by: David Henningsson <email address hidden>
---
 sound/pci/hda/patch_conexant.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 7d941ef..941bf6c 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -3350,6 +3350,7 @@ static int patch_conexant_auto(struct hda_codec *codec)
  switch (codec->vendor_id) {
  case 0x14f15045:
   codec->single_adc_amp = 1;
+ codec->power_filter = NULL; /* Needs speaker amp to D3 to avoid click */
   break;
  case 0x14f15047:
   codec->pin_amp_workaround = 1;
--
1.7.9.5

Revision history for this message
Takashi Iwai (tiwai) wrote :

At Thu, 14 Feb 2013 11:36:39 +0100,
David Henningsson wrote:
>
> This chip needs the speaker pin to go to D3 to avoid clicks,
> so default_power_filter does not work here.
>
> This was found on Thinkpad R61i/T61i but I guess it applies to
> the entire chip. If not, quirks should be set for at least
> PCI SSID 17aa:20ac.
>
> Thanks to c4pp4 for testing.
>
> BugLink: https://bugs.launchpad.net/bugs/886975
> Signed-off-by: David Henningsson <email address hidden>

Thanks, applied now.

Just wonder, though, whether rather setting
spec->gen.power_down_unused = 1 works. When it's set, the generic
parser applies the own power filter, and it doesn't have the EAPD
check either (plus it does more aggressive power-down of unused
widgets).

Or, maybe we just drop the EAPD check, and move it to specific fixup.
AFAIK, it was required only for old Gateway laptops.

Takashi

> ---
> sound/pci/hda/patch_conexant.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
> index 7d941ef..941bf6c 100644
> --- a/sound/pci/hda/patch_conexant.c
> +++ b/sound/pci/hda/patch_conexant.c
> @@ -3350,6 +3350,7 @@ static int patch_conexant_auto(struct hda_codec *codec)
> switch (codec->vendor_id) {
> case 0x14f15045:
> codec->single_adc_amp = 1;
> + codec->power_filter = NULL; /* Needs speaker amp to D3 to avoid click */
> break;
> case 0x14f15047:
> codec->pin_amp_workaround = 1;
> --
> 1.7.9.5
>

Revision history for this message
c4pp4 (c4pp4) wrote :

David, it's because we are no robots, fortunately ;)
Thank you for applying it.

Now there is remaining the last one - number 3. I'd like to ask you if it's in a job queue or something like that.

Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Brad Figg (brad-figg)
tags: added: verification-needed-precise
Revision history for this message
Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed' to 'verification-done'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

Revision history for this message
c4pp4 (c4pp4) wrote :

I don't have precise version so someone else would try it.

Revision history for this message
David Henningsson (diwic) wrote :

@Brad Figg, this came from upstream stable and thus does not require verification.

Revision history for this message
Luis Henriques (henrix) wrote :

Tagging as verified in Precise as fix came from an upstream stable update (as diwic referred in previous comment).

tags: added: verification-done-precise
removed: verification-needed-precise
Revision history for this message
c4pp4 (c4pp4) wrote :

Ubuntu 13.04:
1) Fixed
2) Fixed after oem-audio-hda-daily-dkms installation
3) Not fixed
4) Fixed after oem-audio-hda-daily-dkms installation
5) Fixed

ljubisa (ljubisadenik)
Changed in alsa-driver (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 11.10 (oneiric) reached end-of-life on May 9, 2013.
Ubuntu 13.04 (raring) reached end-of-life on January 27, 2014.
Ubuntu 12.04 (precise) reached end-of-life on April 28, 2017.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test. If you then find the bug is still present in the newer Ubuntu version, please add a comment here telling us which new version it is in and change the bug status to Confirmed.

Changed in alsa-driver (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
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.