• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/libaudio


Commit MetaInfo

Revisiona5bc8ec212b9f366d7f9da972a81caf153e8ff89 (tree)
Time2016-09-13 01:48:57
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

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.

Change Summary

Incremental Difference

--- a/audio_hw.c
+++ b/audio_hw.c
@@ -221,7 +221,11 @@ struct snd_pcm_info *select_card(unsigned int device __unused, unsigned int flag
221221 free(namelist);
222222 }
223223 }
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+ }
225229 ALOGI_IF(info, "choose pcmC%dD%d%c", info->card, info->device, d ? 'c' : 'p');
226230 return info;
227231 }