hardware/libaudio
リビジョン | a5bc8ec212b9f366d7f9da972a81caf153e8ff89 (tree) |
---|---|
日時 | 2016-09-13 01:48:57 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
コミッター | Chih-Wei Huang |
audio_hw: allow to select HDMI audio manually
Before we can select HDMI audio automatically, let the user
do it manually by setting hal.audio.primary.hdmi=1.
@@ -221,7 +221,11 @@ struct snd_pcm_info *select_card(unsigned int device __unused, unsigned int flag | ||
221 | 221 | free(namelist); |
222 | 222 | } |
223 | 223 | } |
224 | - info = cached_info[d] ? cached_info[d] : cached_info[d + 2]; | |
224 | + if (property_get_bool("hal.audio.primary.hdmi", false) && cached_info[d + 2]) { | |
225 | + info = cached_info[d + 2]; | |
226 | + } else { | |
227 | + info = cached_info[d] ? cached_info[d] : cached_info[d + 2]; | |
228 | + } | |
225 | 229 | ALOGI_IF(info, "choose pcmC%dD%d%c", info->card, info->device, d ? 'c' : 'p'); |
226 | 230 | return info; |
227 | 231 | } |