Skip to content

Commit a6c9667

Browse files
committed
Merge tag 'asoc-fix-v5.10-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.10 A batch of driver specific fixes that have come up since the merge window, nothing particularly major here but all good to have.
2 parents 0938eca + f9d7c6e commit a6c9667

16 files changed

Lines changed: 119 additions & 48 deletions

File tree

sound/soc/atmel/mchp-spdiftx.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ static int mchp_spdiftx_hw_params(struct snd_pcm_substream *substream,
487487
}
488488
mchp_spdiftx_channel_status_write(dev);
489489
spin_unlock_irqrestore(&ctrl->lock, flags);
490-
mr |= SPDIFTX_MR_VALID1 | SPDIFTX_MR_VALID2;
491490

492491
if (dev->gclk_enabled) {
493492
clk_disable_unprepare(dev->gclk);

sound/soc/codecs/cs42l51.c

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,28 @@ static const struct snd_soc_dapm_widget cs42l51_dapm_widgets[] = {
254254
&cs42l51_adcr_mux_controls),
255255
};
256256

257+
static int mclk_event(struct snd_soc_dapm_widget *w,
258+
struct snd_kcontrol *kcontrol, int event)
259+
{
260+
struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm);
261+
struct cs42l51_private *cs42l51 = snd_soc_component_get_drvdata(comp);
262+
263+
switch (event) {
264+
case SND_SOC_DAPM_PRE_PMU:
265+
return clk_prepare_enable(cs42l51->mclk_handle);
266+
case SND_SOC_DAPM_POST_PMD:
267+
/* Delay mclk shutdown to fulfill power-down sequence requirements */
268+
msleep(20);
269+
clk_disable_unprepare(cs42l51->mclk_handle);
270+
break;
271+
}
272+
273+
return 0;
274+
}
275+
257276
static const struct snd_soc_dapm_widget cs42l51_dapm_mclk_widgets[] = {
258-
SND_SOC_DAPM_CLOCK_SUPPLY("MCLK")
277+
SND_SOC_DAPM_SUPPLY("MCLK", SND_SOC_NOPM, 0, 0, mclk_event,
278+
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
259279
};
260280

261281
static const struct snd_soc_dapm_route cs42l51_routes[] = {

sound/soc/codecs/wcd9335.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ static const char * const sb_tx8_mux_text[] = {
618618
"ZERO", "RX_MIX_TX8", "DEC8", "DEC8_192"
619619
};
620620

621-
static const DECLARE_TLV_DB_SCALE(digital_gain, 0, 1, 0);
621+
static const DECLARE_TLV_DB_SCALE(digital_gain, -8400, 100, -8400);
622622
static const DECLARE_TLV_DB_SCALE(line_gain, 0, 7, 1);
623623
static const DECLARE_TLV_DB_SCALE(analog_gain, 0, 25, 1);
624624
static const DECLARE_TLV_DB_SCALE(ear_pa_gain, 0, 150, 0);

sound/soc/codecs/wcd934x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ struct wcd_iir_filter_ctl {
551551
struct soc_bytes_ext bytes_ext;
552552
};
553553

554-
static const DECLARE_TLV_DB_SCALE(digital_gain, 0, 1, 0);
554+
static const DECLARE_TLV_DB_SCALE(digital_gain, -8400, 100, -8400);
555555
static const DECLARE_TLV_DB_SCALE(line_gain, 0, 7, 1);
556556
static const DECLARE_TLV_DB_SCALE(analog_gain, 0, 25, 1);
557557
static const DECLARE_TLV_DB_SCALE(ear_pa_gain, 0, 150, 0);

sound/soc/codecs/wsa881x.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,8 @@ static struct snd_soc_dai_driver wsa881x_dais[] = {
10261026
.id = 0,
10271027
.playback = {
10281028
.stream_name = "SPKR Playback",
1029+
.rates = SNDRV_PCM_RATE_48000,
1030+
.formats = SNDRV_PCM_FMTBIT_S16_LE,
10291031
.rate_max = 48000,
10301032
.rate_min = 48000,
10311033
.channels_min = 1,

sound/soc/intel/Kconfig

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,6 @@ config SND_SOC_INTEL_SST_TOPLEVEL
1515

1616
if SND_SOC_INTEL_SST_TOPLEVEL
1717

18-
config SND_SST_IPC
19-
tristate
20-
# This option controls the IPC core for HiFi2 platforms
21-
22-
config SND_SST_IPC_PCI
23-
tristate
24-
select SND_SST_IPC
25-
# This option controls the PCI-based IPC for HiFi2 platforms
26-
# (Medfield, Merrifield).
27-
28-
config SND_SST_IPC_ACPI
29-
tristate
30-
select SND_SST_IPC
31-
# This option controls the ACPI-based IPC for HiFi2 platforms
32-
# (Baytrail, Cherrytrail)
33-
3418
config SND_SOC_INTEL_SST
3519
tristate
3620

@@ -57,7 +41,6 @@ config SND_SST_ATOM_HIFI2_PLATFORM
5741
config SND_SST_ATOM_HIFI2_PLATFORM_PCI
5842
tristate "PCI HiFi2 (Merrifield) Platforms"
5943
depends on X86 && PCI
60-
select SND_SST_IPC_PCI
6144
select SND_SST_ATOM_HIFI2_PLATFORM
6245
help
6346
If you have a Intel Merrifield/Edison platform, then
@@ -70,7 +53,6 @@ config SND_SST_ATOM_HIFI2_PLATFORM_ACPI
7053
tristate "ACPI HiFi2 (Baytrail, Cherrytrail) Platforms"
7154
default ACPI
7255
depends on X86 && ACPI && PCI
73-
select SND_SST_IPC_ACPI
7456
select SND_SST_ATOM_HIFI2_PLATFORM
7557
select SND_SOC_ACPI_INTEL_MATCH
7658
select IOSF_MBI

sound/soc/intel/atom/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ snd-soc-sst-atom-hifi2-platform-objs := sst-mfld-platform-pcm.o \
66
obj-$(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM) += snd-soc-sst-atom-hifi2-platform.o
77

88
# DSP driver
9-
obj-$(CONFIG_SND_SST_IPC) += sst/
9+
obj-$(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM) += sst/

sound/soc/intel/atom/sst/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ snd-intel-sst-core-objs := sst.o sst_ipc.o sst_stream.o sst_drv_interface.o sst_
33
snd-intel-sst-pci-objs += sst_pci.o
44
snd-intel-sst-acpi-objs += sst_acpi.o
55

6-
obj-$(CONFIG_SND_SST_IPC) += snd-intel-sst-core.o
7-
obj-$(CONFIG_SND_SST_IPC_PCI) += snd-intel-sst-pci.o
8-
obj-$(CONFIG_SND_SST_IPC_ACPI) += snd-intel-sst-acpi.o
6+
obj-$(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM) += snd-intel-sst-core.o
7+
obj-$(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI) += snd-intel-sst-pci.o
8+
obj-$(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI) += snd-intel-sst-acpi.o

sound/soc/intel/boards/kbl_rt5663_max98927.c

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -401,17 +401,40 @@ static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
401401
struct snd_interval *chan = hw_param_interval(params,
402402
SNDRV_PCM_HW_PARAM_CHANNELS);
403403
struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
404-
struct snd_soc_dpcm *dpcm = container_of(
405-
params, struct snd_soc_dpcm, hw_params);
406-
struct snd_soc_dai_link *fe_dai_link = dpcm->fe->dai_link;
407-
struct snd_soc_dai_link *be_dai_link = dpcm->be->dai_link;
404+
struct snd_soc_dpcm *dpcm, *rtd_dpcm = NULL;
405+
406+
/*
407+
* The following loop will be called only for playback stream
408+
* In this platform, there is only one playback device on every SSP
409+
*/
410+
for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_PLAYBACK, dpcm) {
411+
rtd_dpcm = dpcm;
412+
break;
413+
}
414+
415+
/*
416+
* This following loop will be called only for capture stream
417+
* In this platform, there is only one capture device on every SSP
418+
*/
419+
for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_CAPTURE, dpcm) {
420+
rtd_dpcm = dpcm;
421+
break;
422+
}
423+
424+
if (!rtd_dpcm)
425+
return -EINVAL;
426+
427+
/*
428+
* The above 2 loops are mutually exclusive based on the stream direction,
429+
* thus rtd_dpcm variable will never be overwritten
430+
*/
408431

409432
/*
410433
* The ADSP will convert the FE rate to 48k, stereo, 24 bit
411434
*/
412-
if (!strcmp(fe_dai_link->name, "Kbl Audio Port") ||
413-
!strcmp(fe_dai_link->name, "Kbl Audio Headset Playback") ||
414-
!strcmp(fe_dai_link->name, "Kbl Audio Capture Port")) {
435+
if (!strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Port") ||
436+
!strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Headset Playback") ||
437+
!strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Capture Port")) {
415438
rate->min = rate->max = 48000;
416439
chan->min = chan->max = 2;
417440
snd_mask_none(fmt);
@@ -421,7 +444,7 @@ static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
421444
* The speaker on the SSP0 supports S16_LE and not S24_LE.
422445
* thus changing the mask here
423446
*/
424-
if (!strcmp(be_dai_link->name, "SSP0-Codec"))
447+
if (!strcmp(rtd_dpcm->be->dai_link->name, "SSP0-Codec"))
425448
snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
426449

427450
return 0;

sound/soc/intel/catpt/dsp.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,12 @@ static int catpt_dsp_select_lpclock(struct catpt_dev *cdev, bool lp, bool waiti)
267267
reg, (reg & CATPT_ISD_DCPWM),
268268
500, 10000);
269269
if (ret) {
270-
dev_err(cdev->dev, "await WAITI timeout\n");
271-
mutex_unlock(&cdev->clk_mutex);
272-
return ret;
270+
dev_warn(cdev->dev, "await WAITI timeout\n");
271+
/* no signal - only high clock selection allowed */
272+
if (lp) {
273+
mutex_unlock(&cdev->clk_mutex);
274+
return 0;
275+
}
273276
}
274277
}
275278

0 commit comments

Comments
 (0)