]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/device-ti-jacinto6evm.git/commitdiff
audio: Add OMAP_ENHANCEMENT to card name query
authorMisael Lopez Cruz <misael.lopez@ti.com>
Tue, 5 Nov 2013 05:36:02 +0000 (23:36 -0600)
committerGerrit Code Review <gerrit2@git.omapzoom.org>
Mon, 25 Nov 2013 21:22:01 +0000 (15:22 -0600)
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>
audio/legacy/audio_hw.c

index 671c83a17c8ebc1e42b9972a8cd6f3204071a85b..c3879177a33fc13c4e20779e5e759fadde8ef628 100644 (file)
@@ -290,6 +290,7 @@ static int find_supported_card(void)
     int found = 0;
     unsigned int i;
 
+#ifdef OMAP_ENHANCEMENT
     do {
         /* returns an error after last valid card */
         int ret = mixer_get_card_name(card, name, sizeof(name));
@@ -304,10 +305,11 @@ static int find_supported_card(void)
             }
         }
     } while (!found && (card++ < MAX_CARD_COUNT));
+#endif
 
     /* Use default card number if not found */
     if (!found)
-        card = 1;
+        card = 0;
 
     return card;
 }