From 40eeacba3b949bcfdb1bbdc8744c49b24e9e7178 Mon Sep 17 00:00:00 2001 From: zhangjiaquan Date: Mon, 5 Nov 2018 00:58:08 -0500 Subject: [PATCH] EKKANE-25:[Kane]kernel:change codec firmware loading solution 1,keep Moto Aov firmware pre configure only 2,support spilit size for CS35l41 firmware 3,add cirrus ez2record firmware format 4,loadting the codec aov firmware in the AP Change-Id: I321318fbe8f7b92f914a5d7cdaa860b156cb47bd Signed-off-by: zhangjiaquan --- .../dts/exynos/exynos9609-robusta2_evb.dts | 13 ----------- sound/soc/codecs/wm_adsp.c | 23 ++++++++++++++----- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/arch/arm64/boot/dts/exynos/exynos9609-robusta2_evb.dts b/arch/arm64/boot/dts/exynos/exynos9609-robusta2_evb.dts index 3d478a64413b..856eb8bc2680 100755 --- a/arch/arm64/boot/dts/exynos/exynos9609-robusta2_evb.dts +++ b/arch/arm64/boot/dts/exynos/exynos9609-robusta2_evb.dts @@ -1929,15 +1929,6 @@ adsps { #address-cells = <1>; #size-cells = <0>; - adsp@0ffe00 { - reg = <0x0ffe00>; - firmware { - ultrasound { - wlf,wmfw-file = "marley-dsp1-ultrasound.wmfw"; - wlf,bin-file = "marley-dsp1v-ultrasound.bin"; - }; - }; - }; adsp@17fe00 { reg = <0x17fe00>; firmware { @@ -1954,10 +1945,6 @@ wlf,wmfw-file = "marley-dsp3-aov-control.wmfw"; wlf,bin-file = "marley-dsp3-aov-model.bin"; }; - ez2record { - wlf,wmfw-file = "marley-dsp3-ez2-record.wmfw"; - wlf,bin-file = "marley-dsp3-ez2-record.bin"; - }; }; }; }; diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 87dfd32256be..eb1bddca4456 100755 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -500,8 +500,8 @@ 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_NUM_FW 11 +#define WM_ADSP_FW_Ez2record 11 +#define WM_ADSP_NUM_FW 12 static const char *wm_adsp_fw_text[WM_ADSP_NUM_FW] = { [WM_ADSP_FW_MBC_VSS] = "MBC/VSS", @@ -515,6 +515,7 @@ 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_Ez2record] = "ez2record", }; struct wm_adsp_system_config_xm_hdr { @@ -683,6 +684,7 @@ static struct wm_adsp_fw_defs wm_adsp_fw[WM_ADSP_NUM_FW] = { }, [WM_ADSP_FW_SPK_PROT] = { .file = "spk-prot" }, [WM_ADSP_FW_MISC] = { .file = "misc" }, + [WM_ADSP_FW_Ez2record] = { .file = "ez2-record" }, }; struct wm_coeff_ctl_ops { @@ -2183,11 +2185,19 @@ static int wm_adsp_load(struct wm_adsp *dsp) case WMFW_ADSP2_XM: case WMFW_ADSP2_YM: case WMFW_ADSP1_ZM: + region_name = wm_adsp_mem_region_name(type); + reg = wm_adsp_region_to_reg(dsp, mem, offset); + break; case WMFW_HALO_PM_PACKED: + region_name = wm_adsp_mem_region_name(type); + reg = wm_adsp_region_to_reg(dsp, mem, offset); + burst_multiple = 20; + break; case WMFW_HALO_XM_PACKED: case WMFW_HALO_YM_PACKED: region_name = wm_adsp_mem_region_name(type); reg = wm_adsp_region_to_reg(dsp, mem, offset); + burst_multiple = 12; break; default: adsp_warn(dsp, @@ -2852,14 +2862,15 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp) reg = offset; } break; - + case WMFW_HALO_PM_PACKED: + burst_multiple += 8; /* plus the 8 below yields 20 */ + case WMFW_HALO_XM_PACKED: + case WMFW_HALO_YM_PACKED: + burst_multiple += 8; /* yields 12 */ case WMFW_ADSP1_DM: case WMFW_ADSP1_ZM: case WMFW_ADSP2_XM: case WMFW_ADSP2_YM: - case WMFW_HALO_XM_PACKED: - case WMFW_HALO_YM_PACKED: - case WMFW_HALO_PM_PACKED: adsp_dbg(dsp, "%s.%d: %d bytes in %x for %x\n", file, blocks, le32_to_cpu(blk->len), type, le32_to_cpu(blk->id)); -- 2.20.1