: es18xx driver fails to set filter register
The following bug has been CLOSED
======================================================================
https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000465
======================================================================
Reported By: ranma Assigned To: tiwai ====================================================================== Project: ALSA - driver Bug ID: 465 Category: ISA - es18xx Reproducibility: always Severity: major Priority: normal Status: closed Distribution: Debian/GNU Linux Kernel Version: 2.6.8 ====================================================================== Date Submitted: 08-26-2004 15:27 CEST Last Modified: 09-24-2004 13:40 CEST
======================================================================
Summary: es18xx driver fails to set filter register
Description:
Apparently my es18xx bugfix was not pushed upstream as I noticed when I switched from Kernel 2.4 + alsa-source to Kernel 2.6, so I'm reposting my original Debian bugreport here:
I just installed alsa on my notebook and the first thing I noticed was that it "does not sound right" with alsa whereas the sound is fine with the kernel oss driver. A short comparison between the kernel driver and the alsa driver turned up the following difference:
alsa-kernel/isa/es18xx.c:
| /* set filter register */
| div0 = 256 - 7160000*20/(8*82*runtime->rate);
|
| if ((chip->caps & ES18XX_PCM2) && mode == DAC2) {
| snd_es18xx_mixer_write(chip, 0x70, bits);
| snd_es18xx_mixer_write(chip, 0x72, div0);
| } else {
| snd_es18xx_write(chip, 0xA1, bits);
| snd_es18xx_write(chip, 0xA2, div0);
| }drivers/sound/sb_ess.c:
| /* Set filter roll-off to 90% of speed/2 */
| speed = (devc->speed * 9) / 20;
|
| div2 = 256 - 7160000 / (speed * 82);
|
| if (!devc->duplex) audionum = 1;
|
| if (audionum == 1) {
| /* Change behaviour of register A1 *
| sb_chg_mixer(devc, 0x71, 0x20, 0x20)
| * For ES1869 only??? */
| ess_write (devc, 0xa1, div);
| ess_write (devc, 0xa2, div2);
| } else {
| ess_setmixer (devc, 0x70, div);
| /*
| * FKS: fascinating: 0x72 doesn't seem to work.
| */
| ess_write (devc, 0xa2, div2);
| ess_setmixer (devc, 0x72, div2);
| }The 'fascinating' comment is the key, after inserting a corresponding line in the ALSA driver, the sound is ok now:
isa/es18xx.c +5 -0
@@ -422,6 +422,11 @@if ((chip->caps &ES18XX_PCM2 ) && mode ==DAC2 ) {snd_es18xx_mixer_write (chip,0x70 , bits); +/* +* Comment from kernel oss driver: +* FKS: fascinating: 0x72 doesn't seem to work. +*/ +snd_es18xx_write (chip,0xA2 , div0);snd_es18xx_mixer_write (chip,0x72 , div0); }else {snd_es18xx_write (chip,0xA1 , bits);
======================================================================
----------------------------------------------------------------------
tiwai - 08-26-2004 17:58 CEST
----------------------------------------------------------------------
Thanks, the patch was applied to cvs.
Bug History
Date Modified Username Field Change
======================================================================
08-26-04 15:27 ranma New Bug 08-26-04 15:27 ranma Distribution => Debian/GNU Linux 08-26-04 15:27 ranma Kernel Version => 2.6.8 08-26-04 17:58 tiwai Bugnote Added: 0001632 08-26-04 17:58 tiwai Assigned To => tiwai 08-26-04 17:58 tiwai Resolution open => fixed 08-26-04 17:58 tiwai Status new => resolved 09-24-04 13:40 tiwai Status resolved => closed
======================================================================
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php