<div class="gmail_quote">On Mon, Sep 13, 2010 at 1:35 PM, Alan Horstmann <span dir="ltr">&lt;<a href="mailto:gineera@aspect135.co.uk">gineera@aspect135.co.uk</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

May be helpful to use alsamixer (command-line pseudo graphical) - that should<br>
present all the controls the driver provides.  Certainly I found that to be<br>
the most useful way of understanding/operating the underlying controls.<br>
(Which envy24control etc operate on top of).<br></blockquote><div><br></div><div>It&#39;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, <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 11.1111px; border-collapse: collapse; "> &#39;IEC958 Input Optical&#39; &#39;IEC958 Input Optical&#39; &#39;ADAT External Master Clock&#39; &#39;ADAT Output Optical&#39; &#39;ADAT Through&#39; &#39;Enable ADAT&#39; -- all appear in alsamixer(1) and they&#39;re all &quot;stuck&quot; at the current settings. </span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 11.1111px; border-collapse: collapse; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 11.1111px; border-collapse: collapse; ">Using either &#39;m&#39; or &#39;space&#39; 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&#39;s what ALSA says it&#39;s at).</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 11.1111px; border-collapse: collapse; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 11.1111px; border-collapse: collapse; ">Similarly, when set from the commandline, the ALSA result indicates the value stays the same:</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 11.1111px; border-collapse: collapse; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 11.1111px; border-collapse: collapse; "><span class="Apple-style-span" style="font-size: 11.1111px; "><div>
amixer cset iface=MIXER,name=&#39;IEC958 Input Optical&#39; true</div><div>numid=95,iface=MIXER,name=&#39;IEC958 Input Optical&#39;</div><div>  ; type=BOOLEAN,access=rw------,values=1</div><div>  : values=off</div></span></span></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"></span></font>
I am fairly sure that the ice1712 driver has no run-time mechanism for<br>
enabling/disabling the paired digital streams that are ADAT on EWS88D, and go<br>
to/from the AK4524 codecs on most other versions.</blockquote><div><br></div><div>Seems like there&#39;s something of it in the code, and certainly the Windows drivers and the hardware itself support this functionality. See also </div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 11.1111px; border-collapse: collapse; "><div>  <a href="http://git.alsa-project.org/?p=alsa-kernel.git;a=blob_plain;f=sound/pci/ice1712/ews.c;hb=HEAD" target="_blank" style="color: rgb(28, 81, 168); ">http://git.alsa-project.org/?p=alsa-kernel.git;a=blob_plain;f=sound/pci/ice1712/ews.c;hb=HEAD</a></div>
<div><br></div><div><div>static struct snd_kcontrol_new snd_ice1712_ews88d_controls[] __devinitdata = {</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, &quot;IEC958 Input Optical&quot;, 0, 1, 0), /* inverted */</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, &quot;ADAT Output Optical&quot;, 1, 0, 0),</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, &quot;ADAT External Master Clock&quot;, 2, 0, 0),</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, &quot;Enable ADAT&quot;, 3, 0, 0),</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, &quot;ADAT Through&quot;, 4, 1, 0),</div>
<div>};</div></div><div><br></div><div>It&#39;s almost like set/get aren&#39;t handling &quot;boolean&quot; correctly... And also, th<span class="Apple-style-span" style="font-size: 11.1111px; ">is &quot;invert&quot; thing looks suspect -- explanation???</span></div>
<div><br></div><div><div>static int snd_ice1712_ews88d_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)</div><div>{</div><div>...</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>int invert = (kcontrol-&gt;private_value &gt;&gt; 8) &amp; 1;</div>
</div><div>...</div><div>}</div><div><div>static int snd_ice1712_ews88d_control_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)</div><div>{</div><div>...</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>int invert = (kcontrol-&gt;private_value &gt;&gt; 8) &amp; 1;</div>
</div><div>...</div><div>}</div></span></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">  With the DMX6fire, which<br>
normally has 3-pairs, I added a different register value used at start-up so<br>
that 2 channel are not active (and picking up &#39;static&#39; noise), but the other<br>
ice1712&#39;s enable all 4 pairs always.<br>
<br>
It is possible that the functions and controls have been coded from<br>
data-sheets and never debugged on real hardware, or at least not in every<br>
respect.  Perhaps others may know?<br></blockquote><div><br></div><div>Hoping somebody knows. Or knows of some magic command or patch I can use to switch these inputs.</div><div><br></div><div>-- Niels</div><div><a href="http://nielsmayer.com">http://nielsmayer.com</a> </div>
<div> </div></div>