{"id":29,"date":"2008-01-11T17:11:49","date_gmt":"2008-01-11T17:11:49","guid":{"rendered":"http:\/\/blog.danplanet.com\/wordpress\/?p=29"},"modified":"2011-11-29T16:24:11","modified_gmt":"2011-11-29T16:24:11","slug":"spdif-and-dolby-digital-out-from-mythtv","status":"publish","type":"post","link":"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/","title":{"rendered":"S\/PDIF and Dolby Digital out from MythTV"},"content":{"rendered":"<p>One of the nice things about getting the upstairs movie room finally bootstrapped is the return to having a real Dolby Digital receiver and more than just stereo sound.\u00a0 I&#8217;ve always been a big fan of loud bass-booming movies with surround sound, but we decided to put the receiver in a closet until the upstairs was ready, instead of sqeezing it into the living room.<\/p>\n<p>The last time I was really using a receiver, I didn&#8217;t have an HDTV, and thus didn&#8217;t have an HD capture card for Myth.\u00a0 This meant that analog stereo out to the receiver was about as good as anything.\u00a0 At the time, I didn&#8217;t have a Myth machine fast enough to reliably do DVDs, so digital audio was pointless.<\/p>\n<p>Yesterday I set out to get S\/PDIF output working from the Myth machine to the receiver.\u00a0 My Myth machines all netboot a read-only copy of FC6 from a server on the network, so upgrading too much software and certainly bumping to a newer version of Fedora is a bit of an ordeal; I was hoping that FC6 would have everything I needed.<\/p>\n<p>I started reading about digital sound with myth, and decided that most of the configuration should be done for me already.\u00a0 I downed the box, and put in a spare SoundBlaster Live! card that I had lying around.\u00a0 The card has a &#8220;digital output&#8221; jack on the back, which I connected to the Coaxial digital input of the receiver with a mono headphone-to-RCA adapter.<\/p>\n<p>If I used something like mplayer to just play audio files (or a DVD) directly, I could see digital audio going to the receiver, but only stereo, and not Dolby Digital.\u00a0 I think this is to be expected, as I wasn&#8217;t telling mplayer to pass the AC3 stream directly to the card.\u00a0 Thus, alsa, or mplayer, or something, was dumping the regular audio out over the digital connection.\u00a0 A good start, but not quite enough.<\/p>\n<p>So, after reading a howto, I tried the following command:<\/p>\n<blockquote style=\"font-family: Courier New,Courier,mono;\"><p>mplayer -ac hwac3 -ao alsa:spdif dvd:\/\/<\/p><\/blockquote>\n<p>From this, I would get nothing.\u00a0 Not even regular 2-channel audio.\u00a0 Not even a blip on the receiver that something had happened on the digital audio line.\u00a0 So I played around with things, including the mixer, and lots of mplayer settings.\u00a0 I couldn&#8217;t figure out why the raw dump of the AC3 stream wasn&#8217;t working.\u00a0 In my frustration, I tried turning back on the integrated sound, since ALSA claimed that it had a subdevice for IEC958 (S\/PDIF) audio.\u00a0 However, pointing mplayer at that resulted in an error, instead of just the appearance of playback without any actual sound (which is what the SoundBlaster was doing).<\/p>\n<p>I put the SoundBlaster back in and fiddled some more.\u00a0 I could see that the subdevice listing showed the analog surround output jacks, but no IEC958 like the integrated audio had:<\/p>\n<blockquote style=\"font-family: Courier New,Courier,mono;\"><p>[root@video2 ~]# aplay -l<br \/>\n**** List of PLAYBACK Hardware Devices ****<br \/>\ncard 0: Live [Dell Sound Blaster Live!], device 0: emu10k1x [EMU10K1X Front]<br \/>\nSubdevices: 1\/1<br \/>\nSubdevice #0: subdevice #0<br \/>\ncard 0: Live [Dell Sound Blaster Live!], device 1: emu10k1x [EMU10K1X Rear]<br \/>\nSubdevices: 1\/1<br \/>\nSubdevice #0: subdevice #0<br \/>\ncard 0: Live [Dell Sound Blaster Live!], device 2: emu10k1x [EMU10K1X Center\/LFE]<br \/>\nSubdevices: 1\/1<br \/>\nSubdevice #0: subdevice #0<\/p><\/blockquote>\n<p>I figured that perhaps one of these subdevices was actually responsible for the digital audio, but perhaps ALSA wasn&#8217;t detecting it.\u00a0 So, I started pointing mplayer directly at the subdevices hoping to get a result:<\/p>\n<blockquote style=\"font-family: Courier New,Courier,mono;\"><p>mplayer -ac hwac3 -ao alsa:device=hw=0.2 dvd:\/\/<\/p><\/blockquote>\n<p>Finally, I saw the blue &#8220;Multichannel Decoding&#8221; light illuminate on the receiver and the Dolby Digital logo appear!\u00a0 The receiver reported 6.1 channel decoding and everything.\u00a0 I was curious if I had just picked the right subdevice right off, so I tried hw=0.1 and hw=0.0, and both worked just the same.\u00a0 Confused about this, I tried without a subdevice using just hw=0 and that also worked.\u00a0 I then thought that perhaps it was the ALSA aliases that were misdirecting the audio, but device=default worked as well.\u00a0 So, it appears that only the spdif alias was wrong, and that unless you tell mplayer otherwise, it tries that alias.<\/p>\n<p>So, I set off to get Myth setup to pass the AC3 from HD programs through to the card in a similar fashion.\u00a0 Analog recordings already worked by just sending the stereo audio out the digital output.\u00a0 To configure the passthrough, I went into Setup-&gt;Setup-&gt;General, and on the third page, I enabled AC3 and DTS to SPDIF passthrough.\u00a0 I also left the passthrough device as &#8220;Default&#8221;, even though the SPDIF device was an option.<\/p>\n<p>After these changes, I can watch HD programs and DVDs through Myth with full 6.1 Dolby Digital or DTS surround sound!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the nice things about getting the upstairs movie room finally bootstrapped is the return to having a real Dolby Digital receiver and more than just stereo sound.\u00a0 I&#8217;ve always been a big fan of loud bass-booming movies with &hellip; <a href=\"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[36,35],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-linux","tag-audio","tag-mythtv-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>S\/PDIF and Dolby Digital out from MythTV - Right Angles<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"S\/PDIF and Dolby Digital out from MythTV - Right Angles\" \/>\n<meta property=\"og:description\" content=\"One of the nice things about getting the upstairs movie room finally bootstrapped is the return to having a real Dolby Digital receiver and more than just stereo sound.\u00a0 I&#8217;ve always been a big fan of loud bass-booming movies with &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/\" \/>\n<meta property=\"og:site_name\" content=\"Right Angles\" \/>\n<meta property=\"article:published_time\" content=\"2008-01-11T17:11:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2011-11-29T16:24:11+00:00\" \/>\n<meta name=\"author\" content=\"Dan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/\"},\"author\":{\"name\":\"Dan\",\"@id\":\"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c\"},\"headline\":\"S\/PDIF and Dolby Digital out from MythTV\",\"datePublished\":\"2008-01-11T17:11:49+00:00\",\"dateModified\":\"2011-11-29T16:24:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/\"},\"wordCount\":805,\"publisher\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c\"},\"keywords\":[\"audio\",\"mythtv\"],\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/\",\"url\":\"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/\",\"name\":\"S\/PDIF and Dolby Digital out from MythTV - Right Angles\",\"isPartOf\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/#website\"},\"datePublished\":\"2008-01-11T17:11:49+00:00\",\"dateModified\":\"2011-11-29T16:24:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.danplanet.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"S\/PDIF and Dolby Digital out from MythTV\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.danplanet.com\/blog\/#website\",\"url\":\"https:\/\/www.danplanet.com\/blog\/\",\"name\":\"Right Angles\",\"description\":\"If they&#039;re not right...they&#039;re wrong\",\"publisher\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.danplanet.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c\",\"name\":\"Dan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9b73782704be64dd8c030087af2d1ae0c1dc488cad69093ff0366dbaad2de673?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9b73782704be64dd8c030087af2d1ae0c1dc488cad69093ff0366dbaad2de673?s=96&d=mm&r=g\",\"caption\":\"Dan\"},\"logo\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.danplanet.com\/blog\/author\/dan\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"S\/PDIF and Dolby Digital out from MythTV - Right Angles","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/","og_locale":"en_US","og_type":"article","og_title":"S\/PDIF and Dolby Digital out from MythTV - Right Angles","og_description":"One of the nice things about getting the upstairs movie room finally bootstrapped is the return to having a real Dolby Digital receiver and more than just stereo sound.\u00a0 I&#8217;ve always been a big fan of loud bass-booming movies with &hellip; Continue reading &rarr;","og_url":"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/","og_site_name":"Right Angles","article_published_time":"2008-01-11T17:11:49+00:00","article_modified_time":"2011-11-29T16:24:11+00:00","author":"Dan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Dan","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/#article","isPartOf":{"@id":"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/"},"author":{"name":"Dan","@id":"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c"},"headline":"S\/PDIF and Dolby Digital out from MythTV","datePublished":"2008-01-11T17:11:49+00:00","dateModified":"2011-11-29T16:24:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/"},"wordCount":805,"publisher":{"@id":"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c"},"keywords":["audio","mythtv"],"articleSection":["Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/","url":"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/","name":"S\/PDIF and Dolby Digital out from MythTV - Right Angles","isPartOf":{"@id":"https:\/\/www.danplanet.com\/blog\/#website"},"datePublished":"2008-01-11T17:11:49+00:00","dateModified":"2011-11-29T16:24:11+00:00","breadcrumb":{"@id":"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.danplanet.com\/blog\/2008\/01\/11\/spdif-and-dolby-digital-out-from-mythtv\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.danplanet.com\/blog\/"},{"@type":"ListItem","position":2,"name":"S\/PDIF and Dolby Digital out from MythTV"}]},{"@type":"WebSite","@id":"https:\/\/www.danplanet.com\/blog\/#website","url":"https:\/\/www.danplanet.com\/blog\/","name":"Right Angles","description":"If they&#039;re not right...they&#039;re wrong","publisher":{"@id":"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.danplanet.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c","name":"Dan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9b73782704be64dd8c030087af2d1ae0c1dc488cad69093ff0366dbaad2de673?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9b73782704be64dd8c030087af2d1ae0c1dc488cad69093ff0366dbaad2de673?s=96&d=mm&r=g","caption":"Dan"},"logo":{"@id":"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/image\/"},"url":"https:\/\/www.danplanet.com\/blog\/author\/dan\/"}]}},"_links":{"self":[{"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":1,"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":140,"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/posts\/29\/revisions\/140"}],"wp:attachment":[{"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}