diff options
| author | Mingming Yin <mingming@codeaurora.org> | 2013-11-26 17:17:01 -0800 |
|---|---|---|
| committer | Steve Kondik <shade@chemlab.org> | 2013-12-12 14:22:27 -0500 |
| commit | b17bf38b533f67c4d0e394dcf97764071dea52b7 (patch) | |
| tree | e73dfb311e38a8a33de0a412d1e4fe46e0ef862b | |
| parent | 990525b055790dfe7bd2081aa22f24bea1449015 (diff) | |
| download | android_hardware_qcom_audio-b17bf38b533f67c4d0e394dcf97764071dea52b7.tar.gz android_hardware_qcom_audio-b17bf38b533f67c4d0e394dcf97764071dea52b7.tar.bz2 android_hardware_qcom_audio-b17bf38b533f67c4d0e394dcf97764071dea52b7.zip | |
hal: fix channel mask for m-ch offload playback
- Update channel mask with compress parameters for
compress offload playback on HDMI device
Change-Id: I89263f56923588fcb906facfd4ae9ebf95203743
| -rw-r--r-- | hal/audio_hw.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c index 2968ef09..9a05ff32 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -854,7 +854,7 @@ static int check_and_set_hdmi_channels(struct audio_device *adev, return 0; if (channels == adev->cur_hdmi_channels) { - ALOGD("%s: Requested channels are same as current", __func__); + ALOGD("%s: Requested channels are same as current channels(%d)", __func__, channels); return 0; } @@ -950,8 +950,12 @@ int start_output_stream(struct stream_out *out) uc_info->out_snd_device = SND_DEVICE_NONE; /* This must be called before adding this usecase to the list */ - if (out->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL) - check_and_set_hdmi_channels(adev, out->config.channels); + if (out->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL) { + if (out->usecase == USECASE_AUDIO_PLAYBACK_OFFLOAD) + check_and_set_hdmi_channels(adev, out->compr_config.codec->ch_in); + else + check_and_set_hdmi_channels(adev, out->config.channels); + } list_add_tail(&adev->usecase_list, &uc_info->list); |
