summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisael Lopez Cruz2013-11-04 23:36:02 -0600
committerGerrit Code Review2013-11-25 15:22:01 -0600
commit51ff757ebe1cb38d28312cf64ad41fd7698a25dc (patch)
treea61168d22ee015cc6191b37ac125c7d1bebc2777 /audio/legacy/audio_hw.c
parente8c8d119a579892d55c660225d53aa7bf05122db (diff)
downloaddevice-ti-jacinto6evm-51ff757ebe1cb38d28312cf64ad41fd7698a25dc.tar.gz
device-ti-jacinto6evm-51ff757ebe1cb38d28312cf64ad41fd7698a25dc.tar.xz
device-ti-jacinto6evm-51ff757ebe1cb38d28312cf64ad41fd7698a25dc.zip
audio: Add OMAP_ENHANCEMENT to card name query
Primary audio HAL uses mixer_get_card_name() function (from tinyalsa which is under OMAP_ENHANCEMENT) to dynamically find the id of the McASP-based sound card. The dynamic search of the card must also be dependent on OMAP_ENHANCEMENT and provide a default card id if the flag is not defined. Change-Id: Id2c610e85d65bc5d559a0c9d1dda0359893a12fa Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Diffstat (limited to 'audio/legacy/audio_hw.c')
-rw-r--r--audio/legacy/audio_hw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/audio/legacy/audio_hw.c b/audio/legacy/audio_hw.c
index 671c83a..c387917 100644
--- a/audio/legacy/audio_hw.c
+++ b/audio/legacy/audio_hw.c
@@ -290,6 +290,7 @@ static int find_supported_card(void)
290 int found = 0; 290 int found = 0;
291 unsigned int i; 291 unsigned int i;
292 292
293#ifdef OMAP_ENHANCEMENT
293 do { 294 do {
294 /* returns an error after last valid card */ 295 /* returns an error after last valid card */
295 int ret = mixer_get_card_name(card, name, sizeof(name)); 296 int ret = mixer_get_card_name(card, name, sizeof(name));
@@ -304,10 +305,11 @@ static int find_supported_card(void)
304 } 305 }
305 } 306 }
306 } while (!found && (card++ < MAX_CARD_COUNT)); 307 } while (!found && (card++ < MAX_CARD_COUNT));
308#endif
307 309
308 /* Use default card number if not found */ 310 /* Use default card number if not found */
309 if (!found) 311 if (!found)
310 card = 1; 312 card = 0;
311 313
312 return card; 314 return card;
313} 315}