<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">This has come up sometime before and another user shared a script to<br>
do just this.  I have modified it to suit my particular needs, but<br>
here it is.<br>
<br>
-------------------------------------------<br>
<br>
#!/usr/bin/python<br>
<br>
from MythTV import MythBE<br>
<br>
be = MythBE()<br>
db = be.db<br>
hostname = db.gethostname()<br>
<br>
print &#39;Host: %s&#39;%hostname<br>
print &#39;\tAudio device: %s&#39;%db.settings[hostname][&#39;AudioOutputDevice&#39;]<br>
print &#39;\tMax Channels: %s&#39;%db.settings[hostname][&#39;MaxChannels&#39;]<br>
print &#39;\tDTS: %s    AC3:<br>
%s&#39;%(db.settings[hostname][&#39;DTSPassThru&#39;],db.settings[hostname][&#39;AC3PassThru&#39;])<br>
<br>
if db.settings[hostname][&#39;AudioOutputDevice&#39;]==&#39;ALSA:plug:a2dp&#39;:<br>
  db.settings[hostname][&#39;AudioOutputDevice&#39;]=&#39;ALSA:iec958:CARD=SB,DEV=0&#39;<br>
  db.settings[hostname][&#39;MaxChannels&#39;]=u&#39;6&#39;<br>
  db.settings[hostname][&#39;DTSPassThru&#39;]=u&#39;1&#39;<br>
  db.settings[hostname][&#39;AC3PassThru&#39;]=u&#39;1&#39;<br>
else:<br>
  db.settings[hostname][&#39;AudioOutputDevice&#39;]=&#39;ALSA:plug:a2dp&#39;<br>
  db.settings[hostname][&#39;MaxChannels&#39;]=u&#39;2&#39;<br>
  db.settings[hostname][&#39;DTSPassThru&#39;]=u&#39;0&#39;<br>
  db.settings[hostname][&#39;AC3PassThru&#39;]=u&#39;0&#39;<br>
<br>
print &#39;Host: %s&#39;%hostname<br>
print &#39;\tAudio device: %s&#39;%db.settings[hostname][&#39;AudioOutputDevice&#39;]<br>
print &#39;\tMax Channels: %s&#39;%db.settings[hostname][&#39;MaxChannels&#39;]<br>
print &#39;\tDTS: %s    AC3:<br>
%s&#39;%(db.settings[hostname][&#39;DTSPassThru&#39;],db.settings[hostname][&#39;AC3PassThru&#39;])<br>
<br>
be.backendCommand(&#39;MESSAGE[]:[]CLEAR_SETTINGS_CACHE&#39;)<br>
<br>
------------------------------------------<br></blockquote><div> </div><div>Hmmmmm, thats got me thinking.  Is there any way to query the frontend for how many channels the audio being played contains (without up-mixing or down-mixing)?</div>
<div><br></div><div>Cheers</div><div>Wayne</div></div>