[mythtv-users] Bluetooth headset with ALSA

Wayne Thomas waynethomas69 at gmail.com
Tue May 31 12:49:37 UTC 2011


>
> This has come up sometime before and another user shared a script to
> do just this.  I have modified it to suit my particular needs, but
> here it is.
>
> -------------------------------------------
>
> #!/usr/bin/python
>
> from MythTV import MythBE
>
> be = MythBE()
> db = be.db
> hostname = db.gethostname()
>
> print 'Host: %s'%hostname
> print '\tAudio device: %s'%db.settings[hostname]['AudioOutputDevice']
> print '\tMax Channels: %s'%db.settings[hostname]['MaxChannels']
> print '\tDTS: %s    AC3:
>
> %s'%(db.settings[hostname]['DTSPassThru'],db.settings[hostname]['AC3PassThru'])
>
> if db.settings[hostname]['AudioOutputDevice']=='ALSA:plug:a2dp':
>  db.settings[hostname]['AudioOutputDevice']='ALSA:iec958:CARD=SB,DEV=0'
>  db.settings[hostname]['MaxChannels']=u'6'
>  db.settings[hostname]['DTSPassThru']=u'1'
>  db.settings[hostname]['AC3PassThru']=u'1'
> else:
>  db.settings[hostname]['AudioOutputDevice']='ALSA:plug:a2dp'
>  db.settings[hostname]['MaxChannels']=u'2'
>  db.settings[hostname]['DTSPassThru']=u'0'
>  db.settings[hostname]['AC3PassThru']=u'0'
>
> print 'Host: %s'%hostname
> print '\tAudio device: %s'%db.settings[hostname]['AudioOutputDevice']
> print '\tMax Channels: %s'%db.settings[hostname]['MaxChannels']
> print '\tDTS: %s    AC3:
>
> %s'%(db.settings[hostname]['DTSPassThru'],db.settings[hostname]['AC3PassThru'])
>
> be.backendCommand('MESSAGE[]:[]CLEAR_SETTINGS_CACHE')
>
> ------------------------------------------
>

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)?

Cheers
Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20110531/b0f028c4/attachment.html 


More information about the mythtv-users mailing list