[alsa-devel] Terratec EWS88D (ice1712) optical stuck on ADAT (no IEC958 optical i/o)

Niels Mayer nielsmayer at gmail.com
Tue Sep 14 03:13:30 CEST 2010


On Mon, Sep 13, 2010 at 1:35 PM, Alan Horstmann <gineera at aspect135.co.uk>wrote:
>
> May be helpful to use alsamixer (command-line pseudo graphical) - that
> should
> present all the controls the driver provides.  Certainly I found that to be
> the most useful way of understanding/operating the underlying controls.
> (Which envy24control etc operate on top of).
>

It's hard to cut and paste from alsamixer(1) which is why I used amixer(1)
and scripting to show what happens in alsamixer(1). The controls of
interest,  'IEC958 Input Optical' 'IEC958 Input Optical' 'ADAT External
Master Clock' 'ADAT Output Optical' 'ADAT Through' 'Enable ADAT' -- all
appear in alsamixer(1) and they're all "stuck" at the current settings.

Using either 'm' or 'space' or any other means that would normally change a
boolean value for other ALSA properties do nothing for the above values in
alsamixer(1). Basically, it appears that the property toggles, and then
flips right back to the previous state (because that's what ALSA says it's
at).

Similarly, when set from the commandline, the ALSA result indicates the
value stays the same:

amixer cset iface=MIXER,name='IEC958 Input Optical' true
numid=95,iface=MIXER,name='IEC958 Input Optical'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off


> I am fairly sure that the ice1712 driver has no run-time mechanism for
> enabling/disabling the paired digital streams that are ADAT on EWS88D, and
> go
> to/from the AK4524 codecs on most other versions.


Seems like there's something of it in the code, and certainly the Windows
drivers and the hardware itself support this functionality. See also

http://git.alsa-project.org/?p=alsa-kernel.git;a=blob_plain;f=sound/pci/ice1712/ews.c;hb=HEAD

static struct snd_kcontrol_new snd_ice1712_ews88d_controls[] __devinitdata =
{
EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "IEC958 Input Optical", 0, 1, 0),
/* inverted */
EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "ADAT Output Optical", 1, 0, 0),
EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "ADAT External Master Clock", 2,
0, 0),
EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "Enable ADAT", 3, 0, 0),
EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "ADAT Through", 4, 1, 0),
};

It's almost like set/get aren't handling "boolean" correctly... And also, this
"invert" thing looks suspect -- explanation???

static int snd_ice1712_ews88d_control_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
...
int invert = (kcontrol->private_value >> 8) & 1;
...
}
static int snd_ice1712_ews88d_control_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
...
int invert = (kcontrol->private_value >> 8) & 1;
...
}


>  With the DMX6fire, which
> normally has 3-pairs, I added a different register value used at start-up
> so
> that 2 channel are not active (and picking up 'static' noise), but the
> other
> ice1712's enable all 4 pairs always.
>
> It is possible that the functions and controls have been coded from
> data-sheets and never debugged on real hardware, or at least not in every
> respect.  Perhaps others may know?
>

Hoping somebody knows. Or knows of some magic command or patch I can use to
switch these inputs.

-- Niels
http://nielsmayer.com


More information about the Alsa-devel mailing list