From dde54c0469f98ffb101916b34cd647a34a8da7ca Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 15 Feb 2017 14:10:58 +0100 Subject: [PATCH] audio: Fix get_snd_device_name() for earpiece SND_DEVICE_MIN_OUT_EARPIECE is set to SND_DEVICE_MIN. Change-Id: I3a442df7f388b72d433257f6ac1db473e4cb14a6 --- audio/audio_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/audio_hw.c b/audio/audio_hw.c index f0bfff07..4a1fc171 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -442,7 +442,7 @@ static const char *get_snd_device_name(snd_device_t snd_device) const char *name = NULL; if (snd_device == SND_DEVICE_NONE || - (snd_device > SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX)) + (snd_device >= SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX)) name = device_table[snd_device]; ALOGE_IF(name == NULL, "%s: invalid snd device %d", __func__, snd_device);