Finally: Managed HDMI support in ubuntu 8.10 with MythTV

Well, it took me some time – so I figured that I would write up the details; so that when I rebuild my HTPC or just in case anyone else is having the same issues!

Firstly; I have MythTV 0.21 running on a Shuttle XPS SG33G5M with Ubuntu 8.10

I have my TV connected by HDMI from the Shuttle – however never been able to get my audio through the HDMI, so always had to run a phono cable from the rear of the Shuttle to separate speakers.

My devices were reported as:

david@Rosy:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC888 Digital [ALC888 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 3: ATI HDMI [ATI HDMI]
Subdevices: 0/1
Subdevice #0: subdevice #0

… and my outputs shown as …


david@Rosy:~$ aplay -L
default:CARD=Intel
HDA Intel, ALC888 Analog
Default Audio Device
front:CARD=Intel,DEV=0
HDA Intel, ALC888 Analog
Front speakers
surround40:CARD=Intel,DEV=0
HDA Intel, ALC888 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
HDA Intel, ALC888 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
HDA Intel, ALC888 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
HDA Intel, ALC888 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
HDA Intel, ALC888 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Intel,DEV=0
HDA Intel, ALC888 Digital
IEC958 (S/PDIF) Digital Audio Output
null
Discard all samples (playback) or generate zero samples (capture)

Firstly my version of ALSA was not the latest …

david@Rosy:~$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.17a.
After failing to download and install the latest ALSA drivers from http://www.alsa-project.org/ I stubbled across a fantastic script which did it all for me. This Alsa 1.0.18 Installation Script (http://ubuntuforums.org/showthread.php?t=962695) automatically download, compiles, installs and configures ALSA 1.0.18a for you. God bless Google and the Open Source world!
Once this was completed a quick confirmed that I could pass audio through the HDMI cable to the TV …

david@Rosy:~$ speaker-test -Dplughw:0,3 -c2
speaker-test 1.0.18
Playback device is plughw:0,3
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 32 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
 0 – Front Left
 1 – Front Right
Now I turned my attention to MythTV and in Setup->Gerneral under the Audio Tab I configured my settings to:

Ouput Audio Device: ALSA:plughw:0,3
Passthrough output device: ALSA:plughw:0,3
Max Audio Channels: 5.1
Upmix: Passive
Enable AC3 to SPDIF passthrough: on
Enable DTS to SPDIF passthrough: on
Mixer Device: ALSA:default
Mixer Controls: Master
This then configured my MythTV frontend to pass all the audio straight through to the HDMI cable going to the TV – result!

This seemed fine – providing that whatever media I was watching/listening to was using MythTV internal commands. However as I was using a bespoke mplayer configuration anything that was played using it passed the audio back to the phono output and not the HDMI.
So, I under the Setup->Media Settings->Video Settings->Player Settings I modified 


Default Video Player: mplayer -vo xv -ao alsa:device=hw=0.3 -autoq 1oo -vf pp -fs -zoom %s

and then made sure that any video file type (avi, mpg etc) was set to use the Default Video Player and not the Internal one.
Result!!!
    banner ad

    line
    footer
    Copyright © 2009 David Baldaro | Powered by Wordpress | Theme designed by Elegant Themes
    The views expressed are those of the authors and do not necessarily reflect those of his employer.