Re: [alsa-devel] Avoid overload of PCM volume on Cx5045 codec
Hello.
I've had a problem with low volume on my laptop and while scratching this itch I found the patch titled "hda-codec - Avoid overload of PCM volume on Cx5045 codec" I reverted this patch and of course got a lot more volume. The description states: "The PCM volume of Cx5045 codec has overload that isn't useful but rather harmful. Add a hack to override the amp info to set the max level 0 dB.". Does anybody know where to find more information on a better default value for the max level setting?
regards,
Andreas Påhlsson
At Wed, 18 Jun 2008 21:58:40 +0200, =?ISO-8859-1?Q?Andreas_P=E5hlsson?= wrote:
Hello.
I've had a problem with low volume on my laptop and while scratching this itch I found the patch titled "hda-codec - Avoid overload of PCM volume on Cx5045 codec" I reverted this patch and of course got a lot more volume. The description states: "The PCM volume of Cx5045 codec has overload that isn't useful but rather harmful. Add a hack to override the amp info to set the max level 0 dB.". Does anybody know where to find more information on a better default value for the max level setting?
Then maybe this workaround is specific to HP laptops. Could you give the alsa-info.sh output, and a more detailed information of your laptop (vendor, model)? Before working on the source code, one should check the mixer setting at first.
Takashi
Hardware:
description: Notebook product: AMILO Pro V3205 vendor: FUJITSU SIEMENS version: Rev 1 serial: YK2H004201 width: 32 bits capabilities: smbios-2.4 dmi-2.4 smp-1.4 smp configuration: boot=oem-specific chassis=notebook cpus=2 uuid=00CAAE3D-9113-0E10-AFC7-E4C0949DBF47
alsa-info.sh:
I have of course played with all the settings with alsamixer before compiling a kernelmodule. As per the comment to the patch the sound can become very distorted without it. 6 dB works fine for me.
For me it is a little strange that it is the PCM volume and not the Master volume that can be boosted. PCM sounds like it would be a internal digital amplification control, Master sounds more like an analog output amplifier control. But thats just me and I don't know the chip at all.
regards,
Andreas
2008/6/19 Takashi Iwai tiwai@suse.de:
At Wed, 18 Jun 2008 21:58:40 +0200, =?ISO-8859-1?Q?Andreas_P=E5hlsson?= wrote:
Hello.
I've had a problem with low volume on my laptop and while scratching this itch I found the patch titled "hda-codec - Avoid overload of PCM volume on Cx5045 codec" I reverted this patch and of course got a lot more volume. The description states: "The PCM volume of Cx5045 codec has overload that isn't useful but rather harmful. Add a hack to override the amp info to set the max level 0 dB.". Does anybody know where to find more information on a better default value for the max level setting?
Then maybe this workaround is specific to HP laptops. Could you give the alsa-info.sh output, and a more detailed information of your laptop (vendor, model)? Before working on the source code, one should check the mixer setting at first.
Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
At Thu, 19 Jun 2008 13:34:25 +0200, =?ISO-8859-1?Q?Andreas_P=E5hlsson?= wrote:
Hardware:
description: Notebook product: AMILO Pro V3205 vendor: FUJITSU SIEMENS version: Rev 1 serial: YK2H004201 width: 32 bits capabilities: smbios-2.4 dmi-2.4 smp-1.4 smp configuration: boot=oem-specific chassis=notebook cpus=2
uuid=00CAAE3D-9113-0E10-AFC7-E4C0949DBF47
alsa-info.sh:
Thanks.
I have of course played with all the settings with alsamixer before compiling a kernelmodule. As per the comment to the patch the sound can become very distorted without it. 6 dB works fine for me.
Hm, but it has far higher values. Do they also work fine (suppose you reverted the amp override patch)?
For me it is a little strange that it is the PCM volume and not the Master volume that can be boosted. PCM sounds like it would be a internal digital amplification control, Master sounds more like an analog output amplifier control. But thats just me and I don't know the chip at all.
It's just a matter of name. In general, "PCM" volume means that the volume control path specific to the PCM, not for other sources. In the case of Conexant codec, there is no loopback route, so it doesn't matter, though.
Takashi
regards,
Andreas
2008/6/19 Takashi Iwai tiwai@suse.de:
At Wed, 18 Jun 2008 21:58:40 +0200, =?ISO-8859-1?Q?Andreas_P=E5hlsson?= wrote:
Hello.
I've had a problem with low volume on my laptop and while scratching this itch I found the patch titled "hda-codec - Avoid overload of PCM volume on Cx5045 codec" I reverted this patch and of course got a lot more volume. The description states: "The PCM volume of Cx5045 codec has overload that isn't useful but rather harmful. Add a hack to override the amp info to set the max level 0 dB.". Does anybody know where to find more information on a better default value for the max level setting?
Then maybe this workaround is specific to HP laptops. Could you give the alsa-info.sh output, and a more detailed information of your laptop (vendor, model)? Before working on the source code, one should check the mixer setting at first.
Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
2008/6/19 Takashi Iwai tiwai@suse.de:
compiling a kernelmodule. As per the comment to the patch the sound can become very distorted without it. 6 dB works fine for me.
Hm, but it has far higher values. Do they also work fine (suppose you reverted the amp override patch)?
They do work but give distorted sound.
For my test I just removed the amp override patch but I would really want to do-the-right-thing.
It's just a matter of name. In general, "PCM" volume means that the volume control path specific to the PCM, not for other sources. In the case of Conexant codec, there is no loopback route, so it doesn't matter, though.
Ok.
Andreas Påhlsson
At Thu, 19 Jun 2008 21:30:31 +0200, =?ISO-8859-1?Q?Andreas_P=E5hlsson?= wrote:
2008/6/19 Takashi Iwai tiwai@suse.de:
compiling a kernelmodule. As per the comment to the patch the sound can become very distorted without it. 6 dB works fine for me.
Hm, but it has far higher values. Do they also work fine (suppose you reverted the amp override patch)?
They do work but give distorted sound.
For my test I just removed the amp override patch but I would really want to do-the-right-thing.
The right thing (tm) would be to add a simple check for activating the amp override. How about the patch below?
Takashi
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index e3df8ac..64df810 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -1005,15 +1005,19 @@ static int patch_cxt5045(struct hda_codec *codec) #endif }
- /* - * Fix max PCM level to 0 dB - * (originall 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)); + switch (codec->subsystem_id >> 16) { + case 0x103c: + /* HP laptop has a really bad sound over 0dB on NID 0x17. + * Fix max PCM level to 0 dB + * (originall 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; + }
return 0; }
participants (2)
-
Andreas Påhlsson
-
Takashi Iwai