From 39e81e99d3e49d8b2542474b4972718ef4948aee Mon Sep 17 00:00:00 2001 From: Paul Handrigan Date: Mon, 15 Jan 2018 15:16:18 -0600 Subject: [PATCH] ASoC: wm_adsp: Change kcontrol for AoU and AoU concurrent Change the dsp firmware control to switch AoU and AoU concurrent firmware. Patch came from vendor (Cirrus). Mot-CRs-fixed: (CR): approach won't work with youtube in background Change-Id: I8822e02f8b4aa229dee187c89297f43e4c111e0f Signed-off-by: Paul Handrigan Tested-by: Jira Key SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Reviewed-by: Konstantin Makariev Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1354954 --- sound/soc/codecs/wm_adsp.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 4a4779c678bb..ba0494ce64e8 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -511,8 +511,10 @@ static void wm_adsp_buf_flash(struct list_head *list, void *dest) #define WM_ADSP_FW_TRACE 8 #define WM_ADSP_FW_SPK_PROT 9 #define WM_ADSP_FW_MISC 10 +#define WM_ADSP_FW_AOU 11 +#define WM_ADSP_FW_AOU_CONCURR 12 -#define WM_ADSP_NUM_FW 11 +#define WM_ADSP_NUM_FW 13 static const char *wm_adsp_fw_text[WM_ADSP_NUM_FW] = { [WM_ADSP_FW_MBC_VSS] = "MBC/VSS", @@ -526,6 +528,8 @@ static const char *wm_adsp_fw_text[WM_ADSP_NUM_FW] = { [WM_ADSP_FW_TRACE] = "Dbg Trace", [WM_ADSP_FW_SPK_PROT] = "Protection", [WM_ADSP_FW_MISC] = "Misc", + [WM_ADSP_FW_AOU] = "AoU", + [WM_ADSP_FW_AOU_CONCURR] = "AoU Audio", }; struct wm_adsp_system_config_xm_hdr { @@ -693,7 +697,9 @@ static struct wm_adsp_fw_defs wm_adsp_fw[WM_ADSP_NUM_FW] = { .caps = trace_caps, }, [WM_ADSP_FW_SPK_PROT] = { .file = "spk-prot" }, - [WM_ADSP_FW_MISC] = { .file = "misc" }, + [WM_ADSP_FW_MISC] = { .file = "misc" }, + [WM_ADSP_FW_AOU] = { .file = "aou-ultrasound" }, + [WM_ADSP_FW_AOU_CONCURR] = { .file = "aou-concurrent" }, }; struct wm_coeff_ctl_ops { @@ -933,8 +939,10 @@ static int wm_adsp_fw_put(struct snd_kcontrol *kcontrol, if (ucontrol->value.enumerated.item[0] == dsp[e->shift_l].fw) return 0; - if (ucontrol->value.enumerated.item[0] >= WM_ADSP_NUM_FW) + if (ucontrol->value.enumerated.item[0] >= WM_ADSP_NUM_FW) { + adsp_dbg(dsp, "Firmware error 1\n"); return -EINVAL; + } mutex_lock(&dsp[e->shift_l].pwr_lock);