summaryrefslogtreecommitdiff
authorLianlian Zhu <lianlian.zhu@amlogic.com>2016-06-20 04:38:46 (GMT)
committer Lianlian Zhu <lianlian.zhu@amlogic.com>2016-06-28 06:07:44 (GMT)
commit8ef6e484ffe435cf56c2ca2b1295c82253429478 (patch)
treef7a52896558efa5bdc7eef562b7c85ddb21e8c79
parent4ec9b7f43de97ba416262105a39d35a73e5e8377 (diff)
downloadaudio-8ef6e484ffe435cf56c2ca2b1295c82253429478.zip
audio-8ef6e484ffe435cf56c2ca2b1295c82253429478.tar.gz
audio-8ef6e484ffe435cf56c2ca2b1295c82253429478.tar.bz2
PD #127235: audio:DTS_HD android 6.0 passthrough support
Change-Id: Ief724bf72769a9652db98a87e81e3d194fde5889
Diffstat
-rw-r--r--hdmi_audio_hw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hdmi_audio_hw.c b/hdmi_audio_hw.c
index 5e2b66c..d1e0601 100644
--- a/hdmi_audio_hw.c
+++ b/hdmi_audio_hw.c
@@ -240,7 +240,8 @@ static int start_output_stream(struct aml_stream_out *out)
out->config.start_threshold = PERIOD_SIZE * PLAYBACK_PERIOD_COUNT;
}
out->config.avail_min = 0;
- set_codec_type(codec_type);
+ if (codec_type != TYPE_DTS_HD)
+ set_codec_type(codec_type);
ALOGI("channels=%d---format=%d---period_count%d---period_size%d---rate=%d---",
out->config.channels, out->config.format, out->config.period_count,
out->config.period_size, out->config.rate);
@@ -457,9 +458,10 @@ out_standby(struct audio_stream *stream)
pthread_mutex_lock(&out->dev->lock);
pthread_mutex_lock(&out->lock);
status = do_output_standby(out);
- set_codec_type(TYPE_PCM);
/* clear the hdmitx channel config to default */
sysfs_set_sysfs_str("/sys/class/amhdmitx/amhdmitx0/aud_output_chs", "0:0");
+ if (out->format != AUDIO_FORMAT_DTS_HD)
+ set_codec_type(TYPE_PCM);
pthread_mutex_unlock(&out->lock);
pthread_mutex_unlock(&out->dev->lock);
return status;