aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2017-11-10 16:30:41 -0500
committerMark Brown <broonie@kernel.org>2017-11-10 16:30:41 -0500
commit60190e46df7fc6e9fe558e3c0aa8af8d70ebc8fa (patch)
treeb4e80524b92ba59d9af6396efad05bbcf591e960
parent16a077e17ccf275a56fa21aa36a019ab063064f9 (diff)
parent3b47c9dc75be097bc0e2f3ac4b176fbf3eed85f2 (diff)
Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus
-rw-r--r--sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c2
-rw-r--r--sound/soc/intel/skylake/skl-messages.c9
-rw-r--r--sound/soc/intel/skylake/skl-nhlt.c9
-rw-r--r--sound/soc/intel/skylake/skl-pcm.c3
-rw-r--r--sound/soc/intel/skylake/skl-sst-utils.c15
-rw-r--r--sound/soc/intel/skylake/skl-topology.h3
6 files changed, 26 insertions, 15 deletions
diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
index 9cd0769ccd34..69ab55956492 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -605,7 +605,7 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
605 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { 605 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
606 codec = pcm->codec_dai->codec; 606 codec = pcm->codec_dai->codec;
607 snprintf(jack_name, sizeof(jack_name), 607 snprintf(jack_name, sizeof(jack_name),
608 "HDMI/DP, pcm=%d Jack", pcm->device); 608 "HDMI/DP,pcm=%d Jack", pcm->device);
609 err = snd_soc_card_jack_new(card, jack_name, 609 err = snd_soc_card_jack_new(card, jack_name,
610 SND_JACK_AVOUT, &ctx->kabylake_hdmi[i], 610 SND_JACK_AVOUT, &ctx->kabylake_hdmi[i],
611 NULL, 0); 611 NULL, 0);
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index 89f70133c8e4..b9c205c8bb73 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -702,18 +702,11 @@ static void skl_set_updown_mixer_format(struct skl_sst *ctx,
702 struct skl_module *module = mconfig->module; 702 struct skl_module *module = mconfig->module;
703 struct skl_module_iface *iface = &module->formats[mconfig->fmt_idx]; 703 struct skl_module_iface *iface = &module->formats[mconfig->fmt_idx];
704 struct skl_module_fmt *fmt = &iface->outputs[0].fmt; 704 struct skl_module_fmt *fmt = &iface->outputs[0].fmt;
705 int i = 0;
706 705
707 skl_set_base_module_format(ctx, mconfig, 706 skl_set_base_module_format(ctx, mconfig,
708 (struct skl_base_cfg *)mixer_mconfig); 707 (struct skl_base_cfg *)mixer_mconfig);
709 mixer_mconfig->out_ch_cfg = fmt->ch_cfg; 708 mixer_mconfig->out_ch_cfg = fmt->ch_cfg;
710 709 mixer_mconfig->ch_map = fmt->ch_map;
711 /* Select F/W default coefficient */
712 mixer_mconfig->coeff_sel = 0x0;
713
714 /* User coeff, don't care since we are selecting F/W defaults */
715 for (i = 0; i < UP_DOWN_MIXER_MAX_COEFF; i++)
716 mixer_mconfig->coeff[i] = 0xDEADBEEF;
717} 710}
718 711
719/* 712/*
diff --git a/sound/soc/intel/skylake/skl-nhlt.c b/sound/soc/intel/skylake/skl-nhlt.c
index e7d766d56c8e..d14c50a60289 100644
--- a/sound/soc/intel/skylake/skl-nhlt.c
+++ b/sound/soc/intel/skylake/skl-nhlt.c
@@ -20,6 +20,8 @@
20#include <linux/pci.h> 20#include <linux/pci.h>
21#include "skl.h" 21#include "skl.h"
22 22
23#define NHLT_ACPI_HEADER_SIG "NHLT"
24
23/* Unique identification for getting NHLT blobs */ 25/* Unique identification for getting NHLT blobs */
24static guid_t osc_guid = 26static guid_t osc_guid =
25 GUID_INIT(0xA69F886E, 0x6CEB, 0x4594, 27 GUID_INIT(0xA69F886E, 0x6CEB, 0x4594,
@@ -45,6 +47,13 @@ struct nhlt_acpi_table *skl_nhlt_init(struct device *dev)
45 memremap(nhlt_ptr->min_addr, nhlt_ptr->length, 47 memremap(nhlt_ptr->min_addr, nhlt_ptr->length,
46 MEMREMAP_WB); 48 MEMREMAP_WB);
47 ACPI_FREE(obj); 49 ACPI_FREE(obj);
50 if (nhlt_table && (strncmp(nhlt_table->header.signature,
51 NHLT_ACPI_HEADER_SIG,
52 strlen(NHLT_ACPI_HEADER_SIG)) != 0)) {
53 memunmap(nhlt_table);
54 dev_err(dev, "NHLT ACPI header signature incorrect\n");
55 return NULL;
56 }
48 return nhlt_table; 57 return nhlt_table;
49 } 58 }
50 59
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index 2b1e513b1680..a3cb204e9640 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -355,7 +355,8 @@ static void skl_pcm_close(struct snd_pcm_substream *substream,
355 } 355 }
356 356
357 mconfig = skl_tplg_fe_get_cpr_module(dai, substream->stream); 357 mconfig = skl_tplg_fe_get_cpr_module(dai, substream->stream);
358 skl_tplg_d0i3_put(skl, mconfig->d0i3_caps); 358 if (mconfig)
359 skl_tplg_d0i3_put(skl, mconfig->d0i3_caps);
359 360
360 kfree(dma_params); 361 kfree(dma_params);
361} 362}
diff --git a/sound/soc/intel/skylake/skl-sst-utils.c b/sound/soc/intel/skylake/skl-sst-utils.c
index 369ef7ce981c..8ff89280d9fd 100644
--- a/sound/soc/intel/skylake/skl-sst-utils.c
+++ b/sound/soc/intel/skylake/skl-sst-utils.c
@@ -251,6 +251,7 @@ int snd_skl_parse_uuids(struct sst_dsp *ctx, const struct firmware *fw,
251 struct uuid_module *module; 251 struct uuid_module *module;
252 struct firmware stripped_fw; 252 struct firmware stripped_fw;
253 unsigned int safe_file; 253 unsigned int safe_file;
254 int ret = 0;
254 255
255 /* Get the FW pointer to derive ADSP header */ 256 /* Get the FW pointer to derive ADSP header */
256 stripped_fw.data = fw->data; 257 stripped_fw.data = fw->data;
@@ -299,8 +300,10 @@ int snd_skl_parse_uuids(struct sst_dsp *ctx, const struct firmware *fw,
299 300
300 for (i = 0; i < num_entry; i++, mod_entry++) { 301 for (i = 0; i < num_entry; i++, mod_entry++) {
301 module = kzalloc(sizeof(*module), GFP_KERNEL); 302 module = kzalloc(sizeof(*module), GFP_KERNEL);
302 if (!module) 303 if (!module) {
303 return -ENOMEM; 304 ret = -ENOMEM;
305 goto free_uuid_list;
306 }
304 307
305 uuid_bin = (uuid_le *)mod_entry->uuid.id; 308 uuid_bin = (uuid_le *)mod_entry->uuid.id;
306 memcpy(&module->uuid, uuid_bin, sizeof(module->uuid)); 309 memcpy(&module->uuid, uuid_bin, sizeof(module->uuid));
@@ -311,8 +314,8 @@ int snd_skl_parse_uuids(struct sst_dsp *ctx, const struct firmware *fw,
311 size = sizeof(int) * mod_entry->instance_max_count; 314 size = sizeof(int) * mod_entry->instance_max_count;
312 module->instance_id = devm_kzalloc(ctx->dev, size, GFP_KERNEL); 315 module->instance_id = devm_kzalloc(ctx->dev, size, GFP_KERNEL);
313 if (!module->instance_id) { 316 if (!module->instance_id) {
314 kfree(module); 317 ret = -ENOMEM;
315 return -ENOMEM; 318 goto free_uuid_list;
316 } 319 }
317 320
318 list_add_tail(&module->list, &skl->uuid_list); 321 list_add_tail(&module->list, &skl->uuid_list);
@@ -323,6 +326,10 @@ int snd_skl_parse_uuids(struct sst_dsp *ctx, const struct firmware *fw,
323 } 326 }
324 327
325 return 0; 328 return 0;
329
330free_uuid_list:
331 skl_freeup_uuid_list(skl);
332 return ret;
326} 333}
327 334
328void skl_freeup_uuid_list(struct skl_sst *ctx) 335void skl_freeup_uuid_list(struct skl_sst *ctx)
diff --git a/sound/soc/intel/skylake/skl-topology.h b/sound/soc/intel/skylake/skl-topology.h
index 2717db92036b..bc3c29161ed0 100644
--- a/sound/soc/intel/skylake/skl-topology.h
+++ b/sound/soc/intel/skylake/skl-topology.h
@@ -34,7 +34,7 @@
34#define MAX_FIXED_DMIC_PARAMS_SIZE 727 34#define MAX_FIXED_DMIC_PARAMS_SIZE 727
35 35
36/* Maximum number of coefficients up down mixer module */ 36/* Maximum number of coefficients up down mixer module */
37#define UP_DOWN_MIXER_MAX_COEFF 6 37#define UP_DOWN_MIXER_MAX_COEFF 8
38 38
39#define MODULE_MAX_IN_PINS 8 39#define MODULE_MAX_IN_PINS 8
40#define MODULE_MAX_OUT_PINS 8 40#define MODULE_MAX_OUT_PINS 8
@@ -161,6 +161,7 @@ struct skl_up_down_mixer_cfg {
161 u32 coeff_sel; 161 u32 coeff_sel;
162 /* Pass the user coeff in this array */ 162 /* Pass the user coeff in this array */
163 s32 coeff[UP_DOWN_MIXER_MAX_COEFF]; 163 s32 coeff[UP_DOWN_MIXER_MAX_COEFF];
164 u32 ch_map;
164} __packed; 165} __packed;
165 166
166struct skl_algo_cfg { 167struct skl_algo_cfg {