diff options
Diffstat (limited to 'hal/msm8974/platform.c')
-rw-r--r-- | hal/msm8974/platform.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c index 0b2f21de..0764d67e 100644 --- a/hal/msm8974/platform.c +++ b/hal/msm8974/platform.c @@ -379,7 +379,7 @@ static int pcm_device_table[AUDIO_USECASE_MAX][2] = { }; /* Array to store sound devices */ -static const char * const device_table[SND_DEVICE_MAX] = { +static const char * device_table[SND_DEVICE_MAX] = { [SND_DEVICE_NONE] = "none", /* Playback sound devices */ [SND_DEVICE_OUT_HANDSET] = "handset", @@ -6935,6 +6935,21 @@ done: return ret; } +int platform_set_snd_device_name(snd_device_t device, const char *name) +{ + int ret = 0; + + if ((device < SND_DEVICE_MIN) || (device >= SND_DEVICE_MAX)) { + ALOGE("%s:: Invalid snd_device = %d", __func__, device); + ret = -EINVAL; + goto done; + } + + device_table[device] = strdup(name); +done: + return ret; +} + int platform_set_sidetone(struct audio_device *adev, snd_device_t out_snd_device, bool enable, |