summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Yves Avenard <jyavenard@mythtv.org>2010-11-20 09:15:00 (GMT)
committer Jean-Yves Avenard <jyavenard@mythtv.org>2010-11-20 09:15:00 (GMT)
commitcf50394621922473f6385a684e6f9f6a91c0da38 (patch)
tree59ec39c7546cfc7c634b92ca4b8e033422bd62f8
parent5b5e3354d3c85dd1c174523cfbd39d012420d570 (diff)
Change the way we determine and set the passthrough device. We now make a difference between the 'auto' and the 'default' device. 'auto' is the default audio device but with extra settings for digital passthrough, 'default' is the same device as the main one. This is used when a passthru device is set manually, and in the case of hdmi, we do not try to set IEC bit provided it will fail anyway
git-svn-id: http://svn.mythtv.org/svn/trunk@27306 7dbf422c-18fa-0310-86e9-fd20926502f2
-rw-r--r--mythtv/libs/libmyth/audiooutputalsa.cpp14
-rw-r--r--mythtv/libs/libmyth/audiooutputdx.cpp2
-rw-r--r--mythtv/libs/libmyth/audiooutputsettings.cpp3
-rw-r--r--mythtv/libs/libmyth/audiosettings.cpp4
4 files changed, 15 insertions, 8 deletions
diff --git a/mythtv/libs/libmyth/audiooutputalsa.cpp b/mythtv/libs/libmyth/audiooutputalsa.cpp
index 3f61a51..20effbc 100644
--- a/mythtv/libs/libmyth/audiooutputalsa.cpp
+++ b/mythtv/libs/libmyth/audiooutputalsa.cpp
@@ -46,15 +46,19 @@ AudioOutputALSA::AudioOutputALSA(const AudioSettings &settings) :
if (passthru_device == "auto")
{
passthru_device = main_device;
- if (!passthru_device.contains(":"))
- passthru_device += ":AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2";
+ if (passthru_device.contains(":"))
+ {
+ passthru_device += ",";
+ }
else
{
- passthru_device = passthru_device.insert(
- passthru_device.indexOf(":") + 1,
- "AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2,");
+ passthru_device += ":";
}
+ passthru_device += "AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2";
}
+ else if (passthru_device.toLower() == "default")
+ passthru_device = main_device;
+
InitSettings(settings);
if (settings.init)
Reconfigure(settings);
diff --git a/mythtv/libs/libmyth/audiooutputdx.cpp b/mythtv/libs/libmyth/audiooutputdx.cpp
index a724b43..af3743d 100644
--- a/mythtv/libs/libmyth/audiooutputdx.cpp
+++ b/mythtv/libs/libmyth/audiooutputdx.cpp
@@ -108,7 +108,7 @@ AudioOutputDX::AudioOutputDX(const AudioSettings &settings) :
{
timeBeginPeriod(1);
InitSettings(settings);
- if (passthru_device == "auto")
+ if (passthru_device == "auto" || passthru_device.toLower() == "default")
passthru_device = main_device;
if (settings.init)
Reconfigure(settings);
diff --git a/mythtv/libs/libmyth/audiooutputsettings.cpp b/mythtv/libs/libmyth/audiooutputsettings.cpp
index d8d164f..f4e6c33 100644
--- a/mythtv/libs/libmyth/audiooutputsettings.cpp
+++ b/mythtv/libs/libmyth/audiooutputsettings.cpp
@@ -319,6 +319,9 @@ AudioOutputSettings* AudioOutputSettings::GetUsers(bool newcopy)
cur_channels = max_channels;
aosettings->SetBestSupportedChannels(cur_channels);
+ // do not passthrough stereo AC3 or stereo DTS
+ // this is required should we need to upmix and at this stage of the
+ // audio lifecycle, we don't know if we will upconvert or not
if (cur_channels <= 2)
bDTS = bAC3 = false;
aosettings->m_AC3 = bAC3;
diff --git a/mythtv/libs/libmyth/audiosettings.cpp b/mythtv/libs/libmyth/audiosettings.cpp
index 7d9a85b..f703945 100644
--- a/mythtv/libs/libmyth/audiosettings.cpp
+++ b/mythtv/libs/libmyth/audiosettings.cpp
@@ -103,14 +103,14 @@ AudioSettings::AudioSettings(
void AudioSettings::FixPassThrough(void)
{
- if (passthru_device.isEmpty() || passthru_device.toLower() == "default")
+ if (passthru_device.isEmpty())
passthru_device = "auto";
}
void AudioSettings::TrimDeviceType(void)
{
main_device.remove(0, 5);
- if (passthru_device != "auto")
+ if (passthru_device != "auto" && passthru_device.toLower() != "default")
passthru_device.remove(0, 5);
}