Skip to content

Commit 7e9a8a8

Browse files
committed
Merge remote-tracking branch 'asoc/topic/intel' into asoc-next
2 parents d33f102 + d5cc0a1 commit 7e9a8a8

22 files changed

Lines changed: 588 additions & 38 deletions

‎include/uapi/sound/snd_sst_tokens.h‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,17 @@
222222
* %SKL_TKN_MM_U32_NUM_IN_FMT: Number of input formats
223223
* %SKL_TKN_MM_U32_NUM_OUT_FMT: Number of output formats
224224
*
225+
* %SKL_TKN_U32_ASTATE_IDX: Table Index for the A-State entry to be filled
226+
* with kcps and clock source
227+
*
228+
* %SKL_TKN_U32_ASTATE_COUNT: Number of valid entries in A-State table
229+
*
230+
* %SKL_TKN_U32_ASTATE_KCPS: Specifies the core load threshold (in kilo
231+
* cycles per second) below which DSP is clocked
232+
* from source specified by clock source.
233+
*
234+
* %SKL_TKN_U32_ASTATE_CLK_SRC: Clock source for A-State entry
235+
*
225236
* module_id and loadable flags dont have tokens as these values will be
226237
* read from the DSP FW manifest
227238
*
@@ -309,7 +320,11 @@ enum SKL_TKNS {
309320
SKL_TKN_MM_U32_NUM_IN_FMT,
310321
SKL_TKN_MM_U32_NUM_OUT_FMT,
311322

312-
SKL_TKN_MAX = SKL_TKN_MM_U32_NUM_OUT_FMT,
323+
SKL_TKN_U32_ASTATE_IDX,
324+
SKL_TKN_U32_ASTATE_COUNT,
325+
SKL_TKN_U32_ASTATE_KCPS,
326+
SKL_TKN_U32_ASTATE_CLK_SRC,
327+
SKL_TKN_MAX = SKL_TKN_U32_ASTATE_CLK_SRC,
313328
};
314329

315330
#endif

‎sound/soc/intel/atom/sst/sst_acpi.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
236236
/* Find the IRQ */
237237
ctx->irq_num = platform_get_irq(pdev,
238238
ctx->pdata->res_info->acpi_ipc_irq_index);
239+
if (ctx->irq_num <= 0)
240+
return ctx->irq_num < 0 ? ctx->irq_num : -EIO;
241+
239242
return 0;
240243
}
241244

‎sound/soc/intel/boards/bytcr_rt5651.c‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ enum {
3838
BYT_RT5651_DMIC_MAP,
3939
BYT_RT5651_IN1_MAP,
4040
BYT_RT5651_IN2_MAP,
41+
BYT_RT5651_IN1_IN2_MAP,
4142
};
4243

4344
#define BYT_RT5651_MAP(quirk) ((quirk) & GENMASK(7, 0))
@@ -171,6 +172,13 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
171172
{"IN2P", NULL, "Internal Mic"},
172173
};
173174

175+
static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_in2_map[] = {
176+
{"Internal Mic", NULL, "micbias1"},
177+
{"IN1P", NULL, "Internal Mic"},
178+
{"IN2P", NULL, "Internal Mic"},
179+
{"IN3P", NULL, "Headset Mic"},
180+
};
181+
174182
static const struct snd_kcontrol_new byt_rt5651_controls[] = {
175183
SOC_DAPM_PIN_SWITCH("Headphone"),
176184
SOC_DAPM_PIN_SWITCH("Headset Mic"),
@@ -256,7 +264,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
256264
DMI_MATCH(DMI_SYS_VENDOR, "KIANO"),
257265
DMI_MATCH(DMI_PRODUCT_NAME, "KIANO SlimNote 14.2"),
258266
},
259-
.driver_data = (void *)(BYT_RT5651_IN2_MAP),
267+
.driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP),
260268
},
261269
{}
262270
};
@@ -281,6 +289,10 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
281289
custom_map = byt_rt5651_intmic_in2_map;
282290
num_routes = ARRAY_SIZE(byt_rt5651_intmic_in2_map);
283291
break;
292+
case BYT_RT5651_IN1_IN2_MAP:
293+
custom_map = byt_rt5651_intmic_in1_in2_map;
294+
num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_in2_map);
295+
break;
284296
default:
285297
custom_map = byt_rt5651_intmic_dmic_map;
286298
num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic_map);

‎sound/soc/intel/boards/haswell.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static int haswell_rt5640_hw_params(struct snd_pcm_substream *substream,
7676
}
7777

7878
/* set correct codec filter for DAI format and clock config */
79-
snd_soc_update_bits(rtd->codec, 0x83, 0xffff, 0x8000);
79+
snd_soc_component_update_bits(codec_dai->component, 0x83, 0xffff, 0x8000);
8080

8181
return ret;
8282
}

‎sound/soc/intel/boards/kbl_rt5663_max98927.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
225225
}
226226

227227
jack = &ctx->kabylake_headset;
228-
snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA);
228+
snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
229229
snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
230230
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
231231
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);

‎sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
195195
}
196196

197197
jack = &ctx->kabylake_headset;
198-
snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA);
198+
snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
199199
snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
200200
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
201201
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);

‎sound/soc/intel/boards/mfld_machine.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ static int snd_mfld_mc_probe(struct platform_device *pdev)
372372

373373
/* retrive the irq number */
374374
irq = platform_get_irq(pdev, 0);
375+
if (irq <= 0)
376+
return irq < 0 ? irq : -ENODEV;
375377

376378
/* audio interrupt base of SRAM location where
377379
* interrupts are stored by System FW */

‎sound/soc/intel/common/sst-dsp.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ int sst_dsp_register_poll(struct sst_dsp *ctx, u32 offset, u32 mask,
269269
*/
270270

271271
timeout = jiffies + msecs_to_jiffies(time);
272-
while (((sst_dsp_shim_read_unlocked(ctx, offset) & mask) != target)
272+
while ((((reg = sst_dsp_shim_read_unlocked(ctx, offset)) & mask) != target)
273273
&& time_before(jiffies, timeout)) {
274274
k++;
275275
if (k > 10)
@@ -278,8 +278,6 @@ int sst_dsp_register_poll(struct sst_dsp *ctx, u32 offset, u32 mask,
278278
usleep_range(s, 2*s);
279279
}
280280

281-
reg = sst_dsp_shim_read_unlocked(ctx, offset);
282-
283281
if ((reg & mask) == target) {
284282
dev_dbg(ctx->dev, "FW Poll Status: reg=%#x %s successful\n",
285283
reg, operation);

‎sound/soc/intel/skylake/bxt-sst.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
595595
INIT_DELAYED_WORK(&skl->d0i3.work, bxt_set_dsp_D0i3);
596596
skl->d0i3.state = SKL_DSP_D0I3_NONE;
597597

598-
return 0;
598+
return skl_dsp_acquire_irq(sst);
599599
}
600600
EXPORT_SYMBOL_GPL(bxt_sst_dsp_init);
601601

‎sound/soc/intel/skylake/cnl-sst.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ int cnl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
458458
cnl->boot_complete = false;
459459
init_waitqueue_head(&cnl->boot_wait);
460460

461-
return 0;
461+
return skl_dsp_acquire_irq(sst);
462462
}
463463
EXPORT_SYMBOL_GPL(cnl_sst_dsp_init);
464464

0 commit comments

Comments
 (0)