From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: SIS7012 SPDIF support Date: Fri, 06 Jun 2003 11:03:15 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <3EDB74E6.3020600@superbug.demon.co.uk> <3EDC8553.8080902@superbug.demon.co.uk> <3EDFEC45.6010908@superbug.demon.co.uk> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: multipart/mixed; boundary="Multipart_Fri_Jun__6_11:03:15_2003-1" Return-path: In-Reply-To: <3EDFEC45.6010908@superbug.demon.co.uk> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: James Courtier-Dutton Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Fri_Jun__6_11:03:15_2003-1 Content-Type: text/plain; charset=US-ASCII At Fri, 06 Jun 2003 02:20:05 +0100, James Courtier-Dutton wrote: > > Takashi Iwai wrote: > > > > > > thanks. looking at the codes, it seems that no special handling for > > the chip. it simply sets up the ac97 registers. > > > > the patch below is a quick hack to set the spdif rate on the first > > playback pcm device. in addition, you'll need to set up the following > > mixer controls: > > > > - 'IEC958 AC97-SPSA' to 0 (slots 3/4). > > - 'IEC958 Playback Switch' to on. > > > > you might need to set up 'IEC958 Playback Default', too, but it might > > not... try once the above two switches at first. > > > > > > Takashi > > I have done some further investigation, and have discovered the type of > ac97 chip used. > I attach output from the ac97#0regs /proc/asound/card0 file. > Here is the url to download datasheets of the chip. > It is an ALC650 Chip. > http://www.realtek.com.tw/downloads/downloads1-3.aspx?lineid=5&famid=All&series=8&refdesign=True oops, it seems like my mistake in the last change. could you try the attached patch? Takashi --Multipart_Fri_Jun__6_11:03:15_2003-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="alc650-fix.dif" Content-Transfer-Encoding: 7bit Index: alsa-kernel/pci/ac97/ac97_patch.c =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v retrieving revision 1.14 diff -u -r1.14 ac97_patch.c --- alsa-kernel/pci/ac97/ac97_patch.c 21 May 2003 09:50:13 -0000 1.14 +++ alsa-kernel/pci/ac97/ac97_patch.c 6 Jun 2003 08:43:09 -0000 @@ -370,18 +370,17 @@ unsigned short val; int spdif = 0; - /* FIXME: set the above 1 if we can detect the chip rev.E correctly. + /* FIXME: set the below 1 if we can detect the chip rev.E correctly. * this is used for switching mic and center/lfe, which needs * resetting GPIO0 level on the older revision. */ ac97->spec.dev_flags = 0; - /* check spdif */ - if (ac97->spec.dev_flags) { - val = snd_ac97_read(ac97, AC97_EXTENDED_STATUS); - if (val & AC97_EA_SPCV) - spdif = 1; - } + /* check spdif (should be only on rev.E) */ + val = snd_ac97_read(ac97, AC97_EXTENDED_STATUS); + if (val & AC97_EA_SPCV) + spdif = 1; + if (spdif) { /* enable spdif in */ snd_ac97_write_cache(ac97, AC97_ALC650_CLOCK, --Multipart_Fri_Jun__6_11:03:15_2003-1-- ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.