From: Takashi Iwai Subject: Re: No sound on ATI IXP with Realtek ALC655 rev0 (MSI Megabook S270) Date: Tue, 30 Aug 2005 12:57:54 +0200 Message-ID: References: <200508291419.34270.rene@exactcode.de> <200508301130.42008.rene@exactcode.de> <200508301149.46320.rene@exactcode.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Harald Welte , =?ISO-8859-1?Q?Ren=E9?= Rebe , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Tue, 30 Aug 2005 12:02:21 +0200, I wrote: >=20 > At Tue, 30 Aug 2005 11:49:42 +0200, > Ren=E9 Rebe wrote: > >=20 > > Hi, > >=20 > > On Tuesday 30 August 2005 11:43, Takashi Iwai wrote: > >=20 > > > That's good to know. Now we need to turn this on automatically at = the > > > start up. > > > > > > Could you attach /proc/asound/card0/codec97#0/* files? > > > Also please give the output of "lspci -nv", too. > (snip)=20 >=20 > Thanks, could you try the patch below? >=20 > I hoped there is something else to detect the spdif-input capability, > but it seems not. So, blacklisting the pci ssid seems to be the only > way to go... >=20 > Harald, the patch might fix the problem on your laptop, too. > Could you check it? I found that Harald's case is a bit different. It uses ALC658 instead of ALC655, IIRC. The patch below is a newer version with more comments. Harald, please add the PCI SSID of your device in alc655_is_using_eapd() function and let me know whether it works. This patch must work with Ren=E9's machine, too. Takashi Index: alsa-kernel/pci/ac97/ac97_patch.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/iwai/cvs/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v retrieving revision 1.93 diff -u -r1.93 ac97_patch.c --- alsa-kernel/pci/ac97/ac97_patch.c 22 Aug 2005 12:42:23 -0000 1.93 +++ alsa-kernel/pci/ac97/ac97_patch.c 30 Aug 2005 10:55:26 -0000 @@ -2130,6 +2130,23 @@ .update_jacks =3D alc655_update_jacks }; =20 +/* We set up pin 47 as SPDIF input like the datasheet's default. + * Some devices require this pin to use as EAPD control, typically for + * the internal speaker. + * Since this can't be detected automatically from the other registers, + * we need to use a blacklist with PCI SSID. + */ +static inline int alc655_is_using_eapd(ac97_t *ac97) +{ + u32 subid =3D ((u32)ac97->subsystem_vendor << 16) | ac97->subsystem_dev= ice; + switch (subid) { + case 0x14620131: /* MSI laptop */ + /* add more here... */ + return 1; + } + return 0; +} + int patch_alc655(ac97_t * ac97) { unsigned int val; @@ -2143,10 +2160,12 @@ =20 /* adjust default values */ val =3D snd_ac97_read(ac97, 0x7a); /* misc control */ - if (ac97->id =3D=3D 0x414c4780) /* ALC658 */ - val &=3D ~(1 << 1); /* Pin 47 is spdif input pin */ - else /* ALC655 */ + if (alc655_is_using_eapd(ac97)) + val &=3D ~(1 << 1); /* Pin 47 is EAPD */ + else val |=3D (1 << 1); /* Pin 47 is spdif input pin */ + if (ac97->id =3D=3D 0x414c4780) /* ALC658 */ + val ^=3D (1 << 1); /* this bit inversed on ALC658 */ val &=3D ~(1 << 12); /* vref enable */ snd_ac97_write_cache(ac97, 0x7a, val); /* set default: spdif-in enabled, ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf