summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMisael Lopez Cruz <misael.lopez@ti.com>2013-10-16 16:56:23 -0500
committerMisael Lopez Cruz <misael.lopez@ti.com>2013-10-22 23:47:06 -0500
commitc98083eb0536df412c1cd4e83301032052afeaa8 (patch)
treec5408618d6e729f7a806a842c3abd19762ccdebb
parent35bff31703d2b91b43c819e0d319efae9f4f9bb1 (diff)
downloadcommon-open-c98083eb0536df412c1cd4e83301032052afeaa8.tar.gz
audio: hdmi: Add OMAP_ENHANCEMENT to card name query
HDMI audio HAL uses mixer_get_card_name() function (from tinyalsa which is under OMAP_ENHANCEMENT) to dynamically find the id of the HDMI sound card. The dynamic search of the card must also be dependent on OMAP_ENHANCEMENT and provide a default the flag is not defined. Change-Id: I53b0511fc3b1bbf0fe809a777f8f2acffd66675e Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
-rw-r--r--audio/hdmi_audio_hw.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/audio/hdmi_audio_hw.c b/audio/hdmi_audio_hw.c
index 8b2315a..4085e97 100644
--- a/audio/hdmi_audio_hw.c
+++ b/audio/hdmi_audio_hw.c
@@ -300,10 +300,15 @@ static int hdmi_out_find_card(void)
char name[256] = "";
int card = 0;
int found = 0;
+ int ret;
do {
/* return an error after last valid card */
- int ret = mixer_get_card_name(card, name, sizeof(name));
+#ifdef OMAP_ENHANCEMENT
+ ret = mixer_get_card_name(card, name, sizeof(name));
+#else
+ ret = -ENOTSUP;
+#endif
if (ret)
break;