Skip to content

Commit 02d5e01

Browse files
committed
Merge tag 'sound-5.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "This became a slightly large collection of changes, partly because I've been off in the last weeks. Most of changes are small and scattered while a bit big change is found in HD-audio Realtek codec driver; it's a very device-specific fix that has been long wanted, so I decided to pick up although it's in the middle RC. Some highlights: - A new guard ioctl for ALSA rawmidi API to avoid the misuse of the new timestamp framing mode; it's for a regression fix - HD-audio: a revert of the 5.15 change that might work badly, new quirks for Lenovo Legion & co, a follow-up fix for CS8409 - ASoC: lots of SOF-related fixes, fsl component fixes, corrections of mediatek drivers - USB-audio: fix for the PM resume - FireWire: oxfw and motu fixes" * tag 'sound-5.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (25 commits) ALSA: pcsp: Make hrtimer forwarding more robust ALSA: rawmidi: introduce SNDRV_RAWMIDI_IOCTL_USER_PVERSION ALSA: firewire-motu: fix truncated bytes in message tracepoints ASoC: SOF: trace: Omit error print when waking up trace sleepers ASoC: mediatek: mt8195: remove wrong fixup assignment on HDMITX ASoC: SOF: loader: Re-phrase the missing firmware error to avoid duplication ASoC: SOF: loader: release_firmware() on load failure to avoid batching ALSA: hda/cs8409: Setup Dolphin Headset Mic as Phantom Jack ALSA: pcxhr: "fix" PCXHR_REG_TO_PORT definition ASoC: SOF: imx: imx8m: Bar index is only valid for IRAM and SRAM types ASoC: SOF: imx: imx8: Bar index is only valid for IRAM and SRAM types ASoC: SOF: Fix DSP oops stack dump output contents ALSA: hda/realtek: Quirks to enable speaker output for Lenovo Legion 7i 15IMHG05, Yoga 7i 14ITL5/15ITL5, and 13s Gen2 laptops. ALSA: usb-audio: Unify mixer resume and reset_resume procedure Revert "ALSA: hda: Drop workaround for a hang at shutdown again" ALSA: oxfw: fix transmission method for Loud models based on OXFW971 ASoC: mediatek: common: handle NULL case in suspend/resume function ASoC: fsl_xcvr: register platform component before registering cpu dai ASoC: fsl_spdif: register platform component before registering cpu dai ASoC: fsl_micfil: register platform component before registering cpu dai ...
2 parents 6e439bb + f2ff714 commit 02d5e01

30 files changed

+272
-102
lines changed

MAINTAINERS

+2-1
Original file line numberDiff line numberDiff line change
@@ -17883,7 +17883,8 @@ M: Olivier Moysan <[email protected]>
1788317883
M: Arnaud Pouliquen <[email protected]>
1788417884
L: [email protected] (moderated for non-subscribers)
1788517885
S: Maintained
17886-
F: Documentation/devicetree/bindings/iio/adc/st,stm32-*.yaml
17886+
F: Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml
17887+
F: Documentation/devicetree/bindings/sound/st,stm32-*.yaml
1788717888
F: sound/soc/stm/
1788817889

1788917890
STM32 TIMER/LPTIMER DRIVERS

include/sound/rawmidi.h

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ struct snd_rawmidi_file {
9898
struct snd_rawmidi *rmidi;
9999
struct snd_rawmidi_substream *input;
100100
struct snd_rawmidi_substream *output;
101+
unsigned int user_pversion; /* supported protocol version */
101102
};
102103

103104
struct snd_rawmidi_str {

include/uapi/sound/asound.h

+1
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@ struct snd_rawmidi_status {
784784

785785
#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int)
786786
#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info)
787+
#define SNDRV_RAWMIDI_IOCTL_USER_PVERSION _IOW('W', 0x02, int)
787788
#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params)
788789
#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status)
789790
#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int)

sound/core/rawmidi.c

+9
Original file line numberDiff line numberDiff line change
@@ -873,12 +873,21 @@ static long snd_rawmidi_ioctl(struct file *file, unsigned int cmd, unsigned long
873873
return -EINVAL;
874874
}
875875
}
876+
case SNDRV_RAWMIDI_IOCTL_USER_PVERSION:
877+
if (get_user(rfile->user_pversion, (unsigned int __user *)arg))
878+
return -EFAULT;
879+
return 0;
880+
876881
case SNDRV_RAWMIDI_IOCTL_PARAMS:
877882
{
878883
struct snd_rawmidi_params params;
879884

880885
if (copy_from_user(&params, argp, sizeof(struct snd_rawmidi_params)))
881886
return -EFAULT;
887+
if (rfile->user_pversion < SNDRV_PROTOCOL_VERSION(2, 0, 2)) {
888+
params.mode = 0;
889+
memset(params.reserved, 0, sizeof(params.reserved));
890+
}
882891
switch (params.stream) {
883892
case SNDRV_RAWMIDI_STREAM_OUTPUT:
884893
if (rfile->output == NULL)

sound/drivers/pcsp/pcsp_lib.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle)
143143
if (pointer_update)
144144
pcsp_pointer_update(chip);
145145

146-
hrtimer_forward(handle, hrtimer_get_expires(handle), ns_to_ktime(ns));
146+
hrtimer_forward_now(handle, ns_to_ktime(ns));
147147

148148
return HRTIMER_RESTART;
149149
}

sound/firewire/motu/amdtp-motu.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,11 @@ static void __maybe_unused copy_message(u64 *frames, __be32 *buffer,
276276

277277
/* This is just for v2/v3 protocol. */
278278
for (i = 0; i < data_blocks; ++i) {
279-
*frames = (be32_to_cpu(buffer[1]) << 16) |
280-
(be32_to_cpu(buffer[2]) >> 16);
279+
*frames = be32_to_cpu(buffer[1]);
280+
*frames <<= 16;
281+
*frames |= be32_to_cpu(buffer[2]) >> 16;
282+
++frames;
281283
buffer += data_block_quadlets;
282-
frames++;
283284
}
284285
}
285286

sound/firewire/oxfw/oxfw.c

+8-5
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,16 @@ static int detect_quirks(struct snd_oxfw *oxfw, const struct ieee1394_device_id
184184
model = val;
185185
}
186186

187-
/*
188-
* Mackie Onyx Satellite with base station has a quirk to report a wrong
189-
* value in 'dbs' field of CIP header against its format information.
190-
*/
191-
if (vendor == VENDOR_LOUD && model == MODEL_SATELLITE)
187+
if (vendor == VENDOR_LOUD) {
188+
// Mackie Onyx Satellite with base station has a quirk to report a wrong
189+
// value in 'dbs' field of CIP header against its format information.
192190
oxfw->quirks |= SND_OXFW_QUIRK_WRONG_DBS;
193191

192+
// OXFW971-based models may transfer events by blocking method.
193+
if (!(oxfw->quirks & SND_OXFW_QUIRK_JUMBO_PAYLOAD))
194+
oxfw->quirks |= SND_OXFW_QUIRK_BLOCKING_TRANSMISSION;
195+
}
196+
194197
return 0;
195198
}
196199

sound/pci/hda/hda_intel.c

+9-3
Original file line numberDiff line numberDiff line change
@@ -883,10 +883,11 @@ static unsigned int azx_get_pos_skl(struct azx *chip, struct azx_dev *azx_dev)
883883
return azx_get_pos_posbuf(chip, azx_dev);
884884
}
885885

886-
static void azx_shutdown_chip(struct azx *chip)
886+
static void __azx_shutdown_chip(struct azx *chip, bool skip_link_reset)
887887
{
888888
azx_stop_chip(chip);
889-
azx_enter_link_reset(chip);
889+
if (!skip_link_reset)
890+
azx_enter_link_reset(chip);
890891
azx_clear_irq_pending(chip);
891892
display_power(chip, false);
892893
}
@@ -895,6 +896,11 @@ static void azx_shutdown_chip(struct azx *chip)
895896
static DEFINE_MUTEX(card_list_lock);
896897
static LIST_HEAD(card_list);
897898

899+
static void azx_shutdown_chip(struct azx *chip)
900+
{
901+
__azx_shutdown_chip(chip, false);
902+
}
903+
898904
static void azx_add_card_list(struct azx *chip)
899905
{
900906
struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
@@ -2357,7 +2363,7 @@ static void azx_shutdown(struct pci_dev *pci)
23572363
return;
23582364
chip = card->private_data;
23592365
if (chip && chip->running)
2360-
azx_shutdown_chip(chip);
2366+
__azx_shutdown_chip(chip, true);
23612367
}
23622368

23632369
/* PCI IDs */

sound/pci/hda/patch_cs8409.c

+3
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,9 @@ void dolphin_fixups(struct hda_codec *codec, const struct hda_fixup *fix, int ac
12071207
snd_hda_jack_add_kctl(codec, DOLPHIN_LO_PIN_NID, "Line Out", true,
12081208
SND_JACK_HEADPHONE, NULL);
12091209

1210+
snd_hda_jack_add_kctl(codec, DOLPHIN_AMIC_PIN_NID, "Microphone", true,
1211+
SND_JACK_MICROPHONE, NULL);
1212+
12101213
cs8409_fix_caps(codec, DOLPHIN_HP_PIN_NID);
12111214
cs8409_fix_caps(codec, DOLPHIN_LO_PIN_NID);
12121215
cs8409_fix_caps(codec, DOLPHIN_AMIC_PIN_NID);

sound/pci/hda/patch_realtek.c

+129
Original file line numberDiff line numberDiff line change
@@ -6429,6 +6429,20 @@ static void alc_fixup_thinkpad_acpi(struct hda_codec *codec,
64296429
hda_fixup_thinkpad_acpi(codec, fix, action);
64306430
}
64316431

6432+
/* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */
6433+
static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec,
6434+
const struct hda_fixup *fix,
6435+
int action)
6436+
{
6437+
struct alc_spec *spec = codec->spec;
6438+
6439+
switch (action) {
6440+
case HDA_FIXUP_ACT_PRE_PROBE:
6441+
spec->gen.suppress_auto_mute = 1;
6442+
break;
6443+
}
6444+
}
6445+
64326446
/* for alc295_fixup_hp_top_speakers */
64336447
#include "hp_x360_helper.c"
64346448

@@ -6646,6 +6660,10 @@ enum {
66466660
ALC623_FIXUP_LENOVO_THINKSTATION_P340,
66476661
ALC255_FIXUP_ACER_HEADPHONE_AND_MIC,
66486662
ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST,
6663+
ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS,
6664+
ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
6665+
ALC287_FIXUP_YOGA7_14ITL_SPEAKERS,
6666+
ALC287_FIXUP_13S_GEN2_SPEAKERS
66496667
};
66506668

66516669
static const struct hda_fixup alc269_fixups[] = {
@@ -8236,6 +8254,113 @@ static const struct hda_fixup alc269_fixups[] = {
82368254
.chained = true,
82378255
.chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
82388256
},
8257+
[ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = {
8258+
.type = HDA_FIXUP_VERBS,
8259+
//.v.verbs = legion_15imhg05_coefs,
8260+
.v.verbs = (const struct hda_verb[]) {
8261+
// set left speaker Legion 7i.
8262+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8263+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
8264+
8265+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8266+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8267+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8268+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
8269+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8270+
8271+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8272+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8273+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8274+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8275+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8276+
8277+
// set right speaker Legion 7i.
8278+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8279+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
8280+
8281+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8282+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8283+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8284+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
8285+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8286+
8287+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8288+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8289+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8290+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8291+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8292+
{}
8293+
},
8294+
.chained = true,
8295+
.chain_id = ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
8296+
},
8297+
[ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE] = {
8298+
.type = HDA_FIXUP_FUNC,
8299+
.v.func = alc287_fixup_legion_15imhg05_speakers,
8300+
.chained = true,
8301+
.chain_id = ALC269_FIXUP_HEADSET_MODE,
8302+
},
8303+
[ALC287_FIXUP_YOGA7_14ITL_SPEAKERS] = {
8304+
.type = HDA_FIXUP_VERBS,
8305+
.v.verbs = (const struct hda_verb[]) {
8306+
// set left speaker Yoga 7i.
8307+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8308+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
8309+
8310+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8311+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8312+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8313+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
8314+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8315+
8316+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8317+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8318+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8319+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8320+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8321+
8322+
// set right speaker Yoga 7i.
8323+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8324+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
8325+
8326+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8327+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xc },
8328+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8329+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
8330+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8331+
8332+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8333+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8334+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8335+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8336+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8337+
{}
8338+
},
8339+
.chained = true,
8340+
.chain_id = ALC269_FIXUP_HEADSET_MODE,
8341+
},
8342+
[ALC287_FIXUP_13S_GEN2_SPEAKERS] = {
8343+
.type = HDA_FIXUP_VERBS,
8344+
.v.verbs = (const struct hda_verb[]) {
8345+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8346+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
8347+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8348+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8349+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8350+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8351+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8352+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
8353+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
8354+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
8355+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
8356+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8357+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
8358+
{ 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
8359+
{}
8360+
},
8361+
.chained = true,
8362+
.chain_id = ALC269_FIXUP_HEADSET_MODE,
8363+
},
82398364
};
82408365

82418366
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -8630,6 +8755,10 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
86308755
SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME),
86318756
SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
86328757
SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP),
8758+
SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
8759+
SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
8760+
SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
8761+
SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
86338762
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
86348763
SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
86358764
SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),

sound/pci/pcxhr/pcxhr_core.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
#define PCXHR_DSP 2
5353

5454
#if (PCXHR_DSP_OFFSET_MAX > PCXHR_PLX_OFFSET_MIN)
55-
#undef PCXHR_REG_TO_PORT(x)
55+
#error PCXHR_REG_TO_PORT(x)
5656
#else
5757
#define PCXHR_REG_TO_PORT(x) ((x)>PCXHR_DSP_OFFSET_MAX ? PCXHR_PLX : PCXHR_DSP)
5858
#endif

sound/soc/fsl/fsl_esai.c

+10-6
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,16 @@ static int fsl_esai_probe(struct platform_device *pdev)
10731073
if (ret < 0)
10741074
goto err_pm_get_sync;
10751075

1076+
/*
1077+
* Register platform component before registering cpu dai for there
1078+
* is not defer probe for platform component in snd_soc_add_pcm_runtime().
1079+
*/
1080+
ret = imx_pcm_dma_init(pdev, IMX_ESAI_DMABUF_SIZE);
1081+
if (ret) {
1082+
dev_err(&pdev->dev, "failed to init imx pcm dma: %d\n", ret);
1083+
goto err_pm_get_sync;
1084+
}
1085+
10761086
ret = devm_snd_soc_register_component(&pdev->dev, &fsl_esai_component,
10771087
&fsl_esai_dai, 1);
10781088
if (ret) {
@@ -1082,12 +1092,6 @@ static int fsl_esai_probe(struct platform_device *pdev)
10821092

10831093
INIT_WORK(&esai_priv->work, fsl_esai_hw_reset);
10841094

1085-
ret = imx_pcm_dma_init(pdev, IMX_ESAI_DMABUF_SIZE);
1086-
if (ret) {
1087-
dev_err(&pdev->dev, "failed to init imx pcm dma: %d\n", ret);
1088-
goto err_pm_get_sync;
1089-
}
1090-
10911095
return ret;
10921096

10931097
err_pm_get_sync:

sound/soc/fsl/fsl_micfil.c

+10-5
Original file line numberDiff line numberDiff line change
@@ -737,18 +737,23 @@ static int fsl_micfil_probe(struct platform_device *pdev)
737737
pm_runtime_enable(&pdev->dev);
738738
regcache_cache_only(micfil->regmap, true);
739739

740+
/*
741+
* Register platform component before registering cpu dai for there
742+
* is not defer probe for platform component in snd_soc_add_pcm_runtime().
743+
*/
744+
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
745+
if (ret) {
746+
dev_err(&pdev->dev, "failed to pcm register\n");
747+
return ret;
748+
}
749+
740750
ret = devm_snd_soc_register_component(&pdev->dev, &fsl_micfil_component,
741751
&fsl_micfil_dai, 1);
742752
if (ret) {
743753
dev_err(&pdev->dev, "failed to register component %s\n",
744754
fsl_micfil_component.name);
745-
return ret;
746755
}
747756

748-
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
749-
if (ret)
750-
dev_err(&pdev->dev, "failed to pcm register\n");
751-
752757
return ret;
753758
}
754759

sound/soc/fsl/fsl_sai.c

+9-5
Original file line numberDiff line numberDiff line change
@@ -1152,11 +1152,10 @@ static int fsl_sai_probe(struct platform_device *pdev)
11521152
if (ret < 0)
11531153
goto err_pm_get_sync;
11541154

1155-
ret = devm_snd_soc_register_component(&pdev->dev, &fsl_component,
1156-
&sai->cpu_dai_drv, 1);
1157-
if (ret)
1158-
goto err_pm_get_sync;
1159-
1155+
/*
1156+
* Register platform component before registering cpu dai for there
1157+
* is not defer probe for platform component in snd_soc_add_pcm_runtime().
1158+
*/
11601159
if (sai->soc_data->use_imx_pcm) {
11611160
ret = imx_pcm_dma_init(pdev, IMX_SAI_DMABUF_SIZE);
11621161
if (ret)
@@ -1167,6 +1166,11 @@ static int fsl_sai_probe(struct platform_device *pdev)
11671166
goto err_pm_get_sync;
11681167
}
11691168

1169+
ret = devm_snd_soc_register_component(&pdev->dev, &fsl_component,
1170+
&sai->cpu_dai_drv, 1);
1171+
if (ret)
1172+
goto err_pm_get_sync;
1173+
11701174
return ret;
11711175

11721176
err_pm_get_sync:

0 commit comments

Comments
 (0)