* [PATCH] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)
@ 2010-03-21 23:01 Daniel Chen
2010-03-22 3:02 ` Raymond Yau
2010-03-22 7:10 ` Takashi Iwai
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Chen @ 2010-03-21 23:01 UTC (permalink / raw)
To: Takashi Iwai, Mike Pontillo, stable; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 114 bytes --]
Hi,
Attached is a patch to fix distortion at max PCM setting for HP
laptops using CX20551 (Waikiki).
Best,
-Dan
[-- Attachment #2: 0001-ALSA-hda-Fix-0-dB-offset-for-HP-laptops-using-CX2055.patch --]
[-- Type: text/x-patch, Size: 1546 bytes --]
From 8442bd67f25ab5df43c99549480d5011fa3cb9c1 Mon Sep 17 00:00:00 2001
From: Daniel T Chen <crimsun@ubuntu.com>
Date: Sun, 21 Mar 2010 18:34:43 -0400
Subject: [PATCH] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)
BugLink: https://launchpad.net/bugs/420578
The OR has verified that his hardware distorts because of the 0 dB
offset not corresponding to the highest PCM level. Fix this by capping
said PCM level to 0 dB similarly to what we do for CX20549 (Venice).
Reported-by: Mike Pontillo <pontillo@gmail.com>
Tested-by: Mike Pontillo <pontillo@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
---
sound/pci/hda/patch_conexant.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 194a28c..61682e1 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -1591,6 +1591,21 @@ static int patch_cxt5047(struct hda_codec *codec)
#endif
}
spec->vmaster_nid = 0x13;
+
+ switch (codec->subsystem_id >> 16) {
+ case 0x103c:
+ /* HP laptops have really bad sound over 0 dB on NID 0x10.
+ * Fix max PCM level to 0 dB (originally it has 0x1e steps
+ * with 0 dB offset 0x17)
+ */
+ snd_hda_override_amp_caps(codec, 0x10, HDA_INPUT,
+ (0x17 << AC_AMPCAP_OFFSET_SHIFT) |
+ (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) |
+ (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
+ (1 << AC_AMPCAP_MUTE_SHIFT));
+ break;
+ }
+
return 0;
}
--
1.7.0
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)
2010-03-21 23:01 [PATCH] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki) Daniel Chen
@ 2010-03-22 3:02 ` Raymond Yau
2010-03-22 4:00 ` Daniel Chen
2010-03-22 7:10 ` Takashi Iwai
1 sibling, 1 reply; 4+ messages in thread
From: Raymond Yau @ 2010-03-22 3:02 UTC (permalink / raw)
To: ALSA Development Mailing List
2010/3/22 Daniel Chen <seven.steps@gmail.com>
> Hi,
>
> Attached is a patch to fix distortion at max PCM setting for HP
> laptops using CX20551 (Waikiki).
>
> Best,
> -Dan
>
>
how did he verifty the 0dB ? using hw device or pulseaudio
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)
2010-03-22 3:02 ` Raymond Yau
@ 2010-03-22 4:00 ` Daniel Chen
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Chen @ 2010-03-22 4:00 UTC (permalink / raw)
To: Raymond Yau; +Cc: ALSA Development Mailing List
On Sun, Mar 21, 2010 at 11:02 PM, Raymond Yau
<superquad.vortex2@gmail.com> wrote:
> how did he verifty the 0dB ? using hw device or pulseaudio
He's in the recipient list; I checked with him on IRC using PulseAudio
(latest stable-queue, flat volume disabled) running the patch applied
to the latest daily alsa-driver stable snap.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)
2010-03-21 23:01 [PATCH] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki) Daniel Chen
2010-03-22 3:02 ` Raymond Yau
@ 2010-03-22 7:10 ` Takashi Iwai
1 sibling, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2010-03-22 7:10 UTC (permalink / raw)
To: Daniel Chen; +Cc: alsa-devel, Mike Pontillo, stable
At Sun, 21 Mar 2010 19:01:18 -0400,
Daniel Chen wrote:
>
> Hi,
>
> Attached is a patch to fix distortion at max PCM setting for HP
> laptops using CX20551 (Waikiki).
Applied now. Thanks.
Takashi
>
> Best,
> -Dan
> [2 0001-ALSA-hda-Fix-0-dB-offset-for-HP-laptops-using-CX2055.patch <text/x-patch; US-ASCII (base64)>]
> From 8442bd67f25ab5df43c99549480d5011fa3cb9c1 Mon Sep 17 00:00:00 2001
> From: Daniel T Chen <crimsun@ubuntu.com>
> Date: Sun, 21 Mar 2010 18:34:43 -0400
> Subject: [PATCH] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)
>
> BugLink: https://launchpad.net/bugs/420578
>
> The OR has verified that his hardware distorts because of the 0 dB
> offset not corresponding to the highest PCM level. Fix this by capping
> said PCM level to 0 dB similarly to what we do for CX20549 (Venice).
>
> Reported-by: Mike Pontillo <pontillo@gmail.com>
> Tested-by: Mike Pontillo <pontillo@gmail.com>
> Cc: <stable@kernel.org>
> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
> ---
> sound/pci/hda/patch_conexant.c | 15 +++++++++++++++
> 1 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
> index 194a28c..61682e1 100644
> --- a/sound/pci/hda/patch_conexant.c
> +++ b/sound/pci/hda/patch_conexant.c
> @@ -1591,6 +1591,21 @@ static int patch_cxt5047(struct hda_codec *codec)
> #endif
> }
> spec->vmaster_nid = 0x13;
> +
> + switch (codec->subsystem_id >> 16) {
> + case 0x103c:
> + /* HP laptops have really bad sound over 0 dB on NID 0x10.
> + * Fix max PCM level to 0 dB (originally it has 0x1e steps
> + * with 0 dB offset 0x17)
> + */
> + snd_hda_override_amp_caps(codec, 0x10, HDA_INPUT,
> + (0x17 << AC_AMPCAP_OFFSET_SHIFT) |
> + (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) |
> + (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
> + (1 << AC_AMPCAP_MUTE_SHIFT));
> + break;
> + }
> +
> return 0;
> }
>
> --
> 1.7.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-22 7:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-21 23:01 [PATCH] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki) Daniel Chen
2010-03-22 3:02 ` Raymond Yau
2010-03-22 4:00 ` Daniel Chen
2010-03-22 7:10 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.