[alsa-devel] multi pcm and mmap problem

Takashi Iwai tiwai at suse.de
Mon Nov 26 11:38:59 CET 2007


At Sun, 25 Nov 2007 17:51:04 -0500,
Tim wrote:
> 
> On Saturday 24 November 2007 05:16:38 am you wrote:
> > At Fri, 23 Nov 2007 20:31:03 -0500,
> > Tim wrote:
> > > A final 'note':
> > > The envy24control app's Master Clock - Signal/No Signal
> > >  seems broken again.
> > > I know the cards are locked, but it still says 'No signal'
> > >  when S/PDIF is selected.
> > Hm, could you check whether it's a driver bug or a bug of
> > envy24control?  This control can be basically also get/set via
> > alsactl.  For example, just run "alsactl -f somefile store", edit the
> > file, and "alsactl -f somefile restore".  Also, you can set the value
> > via amixer, too.
> 
> Pardon my previous enthusiasm. So many months debugging!
> I've straightened my tie and regained my composure now. 
> 
> I tried creating a new asound.state with alsactl.
> The resulting asound.state was smaller, but did not fix the problem.
> I also tried manually turning the 'IEC958 CS8427 Error Status', and the 
>  other related controls, on/off with a mixer, no luck.
>  
> I know the two cards are locked because if I disconnect the S/PDIF cable,
>  the ice1712 card goes silent or makes noises. This is normal behaviour.
> Also, I have run this setup for hours without an xrun or 'un-synced drifting'.
> 
> You know, the 'locked/no signal' indicator never has worked right.
> In ALSA 1.0.9b it always just says 'locked' (see below).

It was a bug.  It used a wrong GPIO with assumption that 1010LT is
compatible with 1010 regarding that, and thus returned only a bogus
value.

> In ALSA 1.0.15 it says 'locked' only when on a fixed internal rate.
> 
> ** Here is some info below which I think will help.
> 
> It seems to me, looking at the 'IEC958 CS8427 Error Status' results below,
>  that envy24control should perhaps be using it, instead of 
>  'Word Clock Status', as a 'locked' indicator.

Actually 'Word Clock Status' is determined from this register value.
So far it checks whether its zero or not.  But this seesm too strict.
We'll need to check only the UNLOCK bit (bit 4) for sync status.

How about the patch below (to alsa-kernel)?


Takashi

diff -r 5e8cab953031 pci/ice1712/delta.c
--- a/pci/ice1712/delta.c	Mon Nov 26 09:00:56 2007 +0100
+++ b/pci/ice1712/delta.c	Mon Nov 26 11:56:18 2007 +0100
@@ -405,7 +405,7 @@ static int snd_ice1712_delta1010lt_wordc
 	if (snd_i2c_sendbytes(ice->cs8427, &reg, 1) != 1)
 		snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg);
 	snd_i2c_readbytes(ice->cs8427, &reg, 1);
-	ucontrol->value.integer.value[0] = (reg ? 1 : 0);
+	ucontrol->value.integer.value[0] = (reg & CS8427_UNLOCK) ? 1 : 0;
 	return 0;
 }
 


More information about the Alsa-devel mailing list