[alsa-devel] snd-hda-intel support for SPDIF-in wiht vt1708 card?

Takashi Iwai tiwai at suse.de
Wed Dec 19 10:30:47 CET 2007


At Tue, 18 Dec 2007 20:49:28 -0800,
John Stile wrote:
> 
> On Tue, 2007-12-18 at 16:05 +0100, Takashi Iwai wrote:
> > At Tue, 18 Dec 2007 08:28:06 -0800,
> > John Stile wrote:
> > > 
> > > On Tue, 2007-12-18 at 14:04 +0100, Takashi Iwai wrote:
> > > > At Mon, 17 Dec 2007 10:27:27 -0800,
> > > > John Stile wrote:
> > > > > 
> > > > > I am trying to use a Via VT1708 audio card ( uses the snd-hda-intel.ko
> > > > > driver) to record from SPDIF-in.
> > > > > 
> > > > > An off-list reply to my posting to alsa-users list suggested that
> > > > > snd-hda-intel.ko might not support SPDIF-in with the VT1708 card, which
> > > > > brought me here.
> > > > > 
> > > > > Can someone who works on the Intel HDA driver tell me if it supports
> > > > > SPDIF-in on the VT1708 audio card?
> > > > 
> > > > It should be, but not tested well, I guess.
> > > > 
> > > > The driver enables the SPDIF-in capability when BIOS sets the pin
> > > > information properly.  Check /proc/asound/card0/codec#* file whether
> > > > you have any (activated) input pin node that supports SPDIF-in.
> > > > 
> > > > 
> > > > Takashi
> > > Thank you for your reply!
> > > The output of your command is below.
> > >   spdif-out=Node 0x25
> > >   spdif-in=Node 0x26
> > > Neither labeled inactive,
> > > but spdif-in doesn't list a "Connection" line.
> > 
> > Just because it's only for input (thus it has no "source").
> > 
> > > I have the latest bios: 1.03 (2007/08/23) (a beta bios is available).
> > > Do I try the beta bios?
> > 
> > I don't think so.  Likely a driver bug.
> > How about the patch below (against the latest HG version)?
> > 
> > 
> > Takashi
> > 
> > diff -r 2d3893cf030c pci/hda/patch_via.c
> > --- a/pci/hda/patch_via.c	Tue Dec 18 15:42:53 2007 +0100
> > +++ b/pci/hda/patch_via.c	Tue Dec 18 17:48:00 2007 +0100
> > @@ -568,25 +568,27 @@ static int via_init(struct hda_codec *co
> >  		if (IS_VT1708_VENDORID(codec->vendor_id)) {
> >  			snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0,
> >  					    AC_VERB_SET_PIN_WIDGET_CONTROL,
> > -					    0x40);
> > +					    PIN_OUT);
> >  			snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0,
> >  					    AC_VERB_SET_EAPD_BTLENABLE, 0x02);
> >  		} else if (IS_VT1709_10CH_VENDORID(codec->vendor_id) ||
> >  			   IS_VT1709_6CH_VENDORID(codec->vendor_id)) {
> >  			snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0,
> >  					    AC_VERB_SET_PIN_WIDGET_CONTROL,
> > -					    0x40);
> > +					    PIN_OUT);
> >  			snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0,
> >  					    AC_VERB_SET_EAPD_BTLENABLE, 0x02);
> >  		} else if (IS_VT1708B_8CH_VENDORID(codec->vendor_id) ||
> >  			   IS_VT1708B_4CH_VENDORID(codec->vendor_id)) {
> >  			snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0,
> >  					    AC_VERB_SET_PIN_WIDGET_CONTROL,
> > -					    0x40);
> > +					    PIN_OUT);
> >  			snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0,
> >  					    AC_VERB_SET_EAPD_BTLENABLE, 0x02);
> >  		}
> > -	}
> > +	} else /* enable SPDIF-input pin */
> > +		snd_hda_codec_write(codec, spec->autocfg.dig_in_pin, 0,
> > +				    AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN);
> >  
> >   	return 0;
> >  }
> 
> After making the changes by hand the compile failed. 

The problem is irrelevant with my patch.
The build looks broken on your system anyway.

> This is the output:
> gcc utils/mod-deps.c -o utils/mod-deps
> utils/mod-deps --basedir /usr/src/alsa-driver/alsa-kernel --hiddendir /usr/src/alsa-driver --versiondep /usr/src/alsa-driver/kconfig-vers --makeconf > toplevel.config.in
> can't handle word INPUT=y properly, supposing it's OK
> can't handle word INPUT=SND_USB_CAIAQ properly, supposing it's OK
> utils/mod-deps --basedir /usr/src/alsa-driver/alsa-kernel --hiddendir /usr/src/alsa-driver --versiondep /usr/src/alsa-driver/kconfig-vers --acinclude > acinclude.m4
> can't handle word INPUT=y properly, supposing it's OK
> can't handle word INPUT=SND_USB_CAIAQ properly, supposing it's OK
> utils/mod-deps --basedir /usr/src/alsa-driver/alsa-kernel --hiddendir /usr/src/alsa-driver --versiondep /usr/src/alsa-driver/kconfig-vers --include > include/config1.h.in
> can't handle word INPUT=y properly, supposing it's OK
> can't handle word INPUT=SND_USB_CAIAQ properly, supposing it's OK
> ./configure --with-debug=full --with-isapnp=yes --with-sequencer=yes
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking for ranlib... ranlib
> checking for a BSD-compatible install... /usr/bin/install -c
> checking how to run the C preprocessor... gcc -E
> checking for grep that handles long lines and -e... /bin/grep
> checking for egrep... /bin/grep -E
> checking for ANSI C header files... yes
> checking for an ANSI C-conforming const... yes
> checking for inline... inline
> checking whether time.h and sys/time.h may both be included... yes
> checking whether gcc needs -traditional... no
> checking for current directory... /usr/src/alsa-driver
> checking cross compile...
> checking for directory with kernel source... /lib/modules/2.6.23-gentoo-r3/source
> checking for directory with kernel build... /lib/modules/2.6.23-gentoo-r3/build
> checking for kernel linux/version.h... yes
> checking for kernel linux/autoconf.h... yes
> checking for kernel version... 2.6.23-gentoo-r3
> checking for GCC version... Kernel compiler: gcc 4.1.2 (Gentoo 4.1.2 p1.0.2) Used compiler: gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.0.2)
> checking for built-in ALSA... no
> checking for existing ALSA module... yes
> checking for Red Hat kernel... auto
> checking for Red Hat kernel... no
> checking for SUSE kernel... auto
> checking for SUSE kernel... no
> checking for CONFIG_EXPERIMENTAL... yes
> checking for kernel linux/config.h... no
> Creating <linux/config.h>...
> checking to modify of kernel linux/kmod.h... no
> checking for kernel linux/utsrelease.h... yes
> checking for kernel linux/compiler.h... yes
> checking for kernel linux/pm.h... yes
> checking for kernel linux/spinlock.h... yes
> checking for kernel linux/irq.h... yes
> checking for kernel linux/threads.h... yes
> checking for kernel linux/rwsem.h... yes
> checking for kernel linux/gameport.h... yes
> checking for kernel media/v4l2-dev.h... yes
> checking for kernel linux/devfs_fs_kernel.h... no
> Creating a dummy <linux/devfs_fs_kernel.h>...
> checking for kernel linux/highmem.h... yes
> checking for kernel linux/workqueue.h... yes
> checking for kernel linux/dma-mapping.h... yes
> checking for kernel asm/hw_irq.h... yes
> checking for kernel linux/device.h... yes
> checking for kernel linux/platform_device.h... yes
> checking for kernel linux/isa.h... yes
> checking for kernel linux/jiffies.h... yes
> checking for kernel linux/compat.h... yes
> checking for kernel linux/log2.h... yes
> checking for kernel linux/adb.h... yes
> checking for kernel linux/cuda.h... yes
> checking for kernel linux/pmu.h... yes
> checking for kernel linux/moduleparam.h... yes
> checking for kernel linux/syscalls.h... yes
> checking for kernel linux/firmware.h... yes
> checking for kernel linux/err.h... yes
> checking for kernel linux/bitmap.h... yes
> checking for kernel linux/mutex.h... yes
> checking for kernel linux/latency.h... yes
> checking for kernel linux/kthread.h... yes
> checking for kernel asm/irq_regs.h... yes
> checking for kernel module symbol versions... yes
> checking for has ioport support... yes
> checking for PCI support in kernel... yes
> checking for I2C driver in kernel... module
> checking for I2C_POWERMAC in kernel... unknown
> checking for firmware loader... module
> checking for input subsystem in kernel... yes
> checking for directory to store kernel modules... /lib/modules/2.6.23-gentoo-r3/kernel/sound
> checking for verbose procfs... on
> checking for verbose printk... on
> checking for debug level... full
> checking for ISA support in kernel... yes
> checking for processor type... x86_32
> checking for ISA DMA API... yes
> checking for SMP... yes
> checking for Video device support in kernel... yes
> checking for ISA PnP driver in kernel... yes
> checking for PnP driver in kernel... yes
> checking for Kernel ISA-PnP support... yes
> checking for strlcpy... yes
> checking for snprintf... yes
> checking for vsnprintf... yes
> checking for scnprintf... yes
> checking for sscanf... yes
> checking for vmalloc_to_page... no

The configure doesn't check properly from here on.
Check config.log.  You must have relevant compile error messages.


Takashi


More information about the Alsa-devel mailing list