Skip to content

Commit 4536579

Browse files
committed
Merge tag 'sound-5.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "A collection of small fixes. A large series is found for ASoC tegra drivers to correct the control element handlings, while others are mostly for device-specific quirks and fix-ups" * tag 'sound-5.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (25 commits) ALSA: hda/hdmi: fix HDA codec entry table order for ADL-P ALSA: hda: Add Intel DG2 PCI ID and HDMI codec vid ALSA: hda/cs8409: Set PMSG_ON earlier inside cs8409 driver ASoC: SOF: hda: reset DAI widget before reconfiguring it ASoC: cs35l41: Set the max SPI speed for the whole device ALSA: intel-dsp-config: add quirk for CML devices based on ES8336 codec ASoC: Intel: soc-acpi: add entry for ESSX8336 on CML ASoC: rk817: Add module alias for rk817-codec ASoC: soc-acpi: Set mach->id field on comp_ids matches ASoC: tegra: Fix kcontrol put callback in Mixer ASoC: tegra: Fix kcontrol put callback in ADX ASoC: tegra: Fix kcontrol put callback in AMX ASoC: tegra: Fix kcontrol put callback in SFC ASoC: tegra: Fix kcontrol put callback in MVC ASoC: tegra: Fix kcontrol put callback in AHUB ASoC: tegra: Fix kcontrol put callback in DSPK ASoC: tegra: Fix kcontrol put callback in DMIC ASoC: tegra: Fix kcontrol put callback in I2S ASoC: tegra: Fix kcontrol put callback in ADMAIF ASoC: tegra: Fix wrong value type in MVC ...
2 parents 58e1100 + 289047d commit 4536579

23 files changed

+839
-260
lines changed

include/sound/soc-acpi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ struct snd_soc_acpi_link_adr {
147147
*/
148148
/* Descriptor for SST ASoC machine driver */
149149
struct snd_soc_acpi_mach {
150-
const u8 id[ACPI_ID_LEN];
150+
u8 id[ACPI_ID_LEN];
151151
const struct snd_soc_acpi_codecs *comp_ids;
152152
const u32 link_mask;
153153
const struct snd_soc_acpi_link_adr *links;

sound/hda/intel-dsp-config.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ static const struct config_entry config_table[] = {
252252
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
253253
.device = 0x02c8,
254254
},
255+
{
256+
.flags = FLAG_SOF,
257+
.device = 0x02c8,
258+
.codec_hid = "ESSX8336",
259+
},
255260
/* Cometlake-H */
256261
{
257262
.flags = FLAG_SOF,
@@ -276,6 +281,11 @@ static const struct config_entry config_table[] = {
276281
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
277282
.device = 0x06c8,
278283
},
284+
{
285+
.flags = FLAG_SOF,
286+
.device = 0x06c8,
287+
.codec_hid = "ESSX8336",
288+
},
279289
#endif
280290

281291
/* Icelake */

sound/pci/hda/hda_intel.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,10 @@ enum {
335335
((pci)->device == 0x0c0c) || \
336336
((pci)->device == 0x0d0c) || \
337337
((pci)->device == 0x160c) || \
338-
((pci)->device == 0x490d))
338+
((pci)->device == 0x490d) || \
339+
((pci)->device == 0x4f90) || \
340+
((pci)->device == 0x4f91) || \
341+
((pci)->device == 0x4f92))
339342

340343
#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
341344

@@ -2473,6 +2476,13 @@ static const struct pci_device_id azx_ids[] = {
24732476
/* DG1 */
24742477
{ PCI_DEVICE(0x8086, 0x490d),
24752478
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
2479+
/* DG2 */
2480+
{ PCI_DEVICE(0x8086, 0x4f90),
2481+
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
2482+
{ PCI_DEVICE(0x8086, 0x4f91),
2483+
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
2484+
{ PCI_DEVICE(0x8086, 0x4f92),
2485+
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
24762486
/* Alderlake-S */
24772487
{ PCI_DEVICE(0x8086, 0x7ad0),
24782488
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},

sound/pci/hda/hda_local.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,15 @@ int snd_hda_codec_set_pin_target(struct hda_codec *codec, hda_nid_t nid,
438438
#define for_each_hda_codec_node(nid, codec) \
439439
for ((nid) = (codec)->core.start_nid; (nid) < (codec)->core.end_nid; (nid)++)
440440

441+
/* Set the codec power_state flag to indicate to allow unsol event handling;
442+
* see hda_codec_unsol_event() in hda_bind.c. Calling this might confuse the
443+
* state tracking, so use with care.
444+
*/
445+
static inline void snd_hda_codec_allow_unsol_events(struct hda_codec *codec)
446+
{
447+
codec->core.dev.power.power_state = PMSG_ON;
448+
}
449+
441450
/*
442451
* get widget capabilities
443452
*/

sound/pci/hda/patch_cs8409.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,11 @@ static void cs42l42_resume(struct sub_codec *cs42l42)
750750
if (cs42l42->full_scale_vol)
751751
cs8409_i2c_write(cs42l42, 0x2001, 0x01);
752752

753+
/* we have to explicitly allow unsol event handling even during the
754+
* resume phase so that the jack event is processed properly
755+
*/
756+
snd_hda_codec_allow_unsol_events(cs42l42->codec);
757+
753758
cs42l42_enable_jack_detect(cs42l42);
754759
}
755760

sound/pci/hda/patch_hdmi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4380,10 +4380,11 @@ HDA_CODEC_ENTRY(0x8086280f, "Icelake HDMI", patch_i915_icl_hdmi),
43804380
HDA_CODEC_ENTRY(0x80862812, "Tigerlake HDMI", patch_i915_tgl_hdmi),
43814381
HDA_CODEC_ENTRY(0x80862814, "DG1 HDMI", patch_i915_tgl_hdmi),
43824382
HDA_CODEC_ENTRY(0x80862815, "Alderlake HDMI", patch_i915_tgl_hdmi),
4383-
HDA_CODEC_ENTRY(0x8086281c, "Alderlake-P HDMI", patch_i915_tgl_hdmi),
43844383
HDA_CODEC_ENTRY(0x80862816, "Rocketlake HDMI", patch_i915_tgl_hdmi),
4384+
HDA_CODEC_ENTRY(0x80862819, "DG2 HDMI", patch_i915_tgl_hdmi),
43854385
HDA_CODEC_ENTRY(0x8086281a, "Jasperlake HDMI", patch_i915_icl_hdmi),
43864386
HDA_CODEC_ENTRY(0x8086281b, "Elkhartlake HDMI", patch_i915_icl_hdmi),
4387+
HDA_CODEC_ENTRY(0x8086281c, "Alderlake-P HDMI", patch_i915_tgl_hdmi),
43874388
HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI", patch_generic_hdmi),
43884389
HDA_CODEC_ENTRY(0x80862882, "Valleyview2 HDMI", patch_i915_byt_hdmi),
43894390
HDA_CODEC_ENTRY(0x80862883, "Braswell HDMI", patch_i915_byt_hdmi),

sound/soc/codecs/cs35l41-spi.c

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,34 +42,6 @@ static const struct spi_device_id cs35l41_id_spi[] = {
4242

4343
MODULE_DEVICE_TABLE(spi, cs35l41_id_spi);
4444

45-
static void cs35l41_spi_otp_setup(struct cs35l41_private *cs35l41,
46-
bool is_pre_setup, unsigned int *freq)
47-
{
48-
struct spi_device *spi;
49-
u32 orig_spi_freq;
50-
51-
spi = to_spi_device(cs35l41->dev);
52-
53-
if (!spi) {
54-
dev_err(cs35l41->dev, "%s: No SPI device\n", __func__);
55-
return;
56-
}
57-
58-
if (is_pre_setup) {
59-
orig_spi_freq = spi->max_speed_hz;
60-
if (orig_spi_freq > CS35L41_SPI_MAX_FREQ_OTP) {
61-
spi->max_speed_hz = CS35L41_SPI_MAX_FREQ_OTP;
62-
spi_setup(spi);
63-
}
64-
*freq = orig_spi_freq;
65-
} else {
66-
if (spi->max_speed_hz != *freq) {
67-
spi->max_speed_hz = *freq;
68-
spi_setup(spi);
69-
}
70-
}
71-
}
72-
7345
static int cs35l41_spi_probe(struct spi_device *spi)
7446
{
7547
const struct regmap_config *regmap_config = &cs35l41_regmap_spi;
@@ -81,6 +53,9 @@ static int cs35l41_spi_probe(struct spi_device *spi)
8153
if (!cs35l41)
8254
return -ENOMEM;
8355

56+
spi->max_speed_hz = CS35L41_SPI_MAX_FREQ;
57+
spi_setup(spi);
58+
8459
spi_set_drvdata(spi, cs35l41);
8560
cs35l41->regmap = devm_regmap_init_spi(spi, regmap_config);
8661
if (IS_ERR(cs35l41->regmap)) {
@@ -91,7 +66,6 @@ static int cs35l41_spi_probe(struct spi_device *spi)
9166

9267
cs35l41->dev = &spi->dev;
9368
cs35l41->irq = spi->irq;
94-
cs35l41->otp_setup = cs35l41_spi_otp_setup;
9569

9670
return cs35l41_probe(cs35l41, pdata);
9771
}

sound/soc/codecs/cs35l41.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ static int cs35l41_otp_unpack(void *data)
302302
const struct cs35l41_otp_packed_element_t *otp_map;
303303
struct cs35l41_private *cs35l41 = data;
304304
int bit_offset, word_offset, ret, i;
305-
unsigned int orig_spi_freq;
306305
unsigned int bit_sum = 8;
307306
u32 otp_val, otp_id_reg;
308307
u32 *otp_mem;
@@ -326,19 +325,13 @@ static int cs35l41_otp_unpack(void *data)
326325
goto err_otp_unpack;
327326
}
328327

329-
if (cs35l41->otp_setup)
330-
cs35l41->otp_setup(cs35l41, true, &orig_spi_freq);
331-
332328
ret = regmap_bulk_read(cs35l41->regmap, CS35L41_OTP_MEM0, otp_mem,
333329
CS35L41_OTP_SIZE_WORDS);
334330
if (ret < 0) {
335331
dev_err(cs35l41->dev, "Read OTP Mem failed: %d\n", ret);
336332
goto err_otp_unpack;
337333
}
338334

339-
if (cs35l41->otp_setup)
340-
cs35l41->otp_setup(cs35l41, false, &orig_spi_freq);
341-
342335
otp_map = otp_map_match->map;
343336

344337
bit_offset = otp_map_match->bit_offset;

sound/soc/codecs/cs35l41.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@
726726
#define CS35L41_FS2_WINDOW_MASK 0x00FFF800
727727
#define CS35L41_FS2_WINDOW_SHIFT 12
728728

729-
#define CS35L41_SPI_MAX_FREQ_OTP 4000000
729+
#define CS35L41_SPI_MAX_FREQ 4000000
730730

731731
#define CS35L41_RX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
732732
#define CS35L41_TX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
@@ -764,8 +764,6 @@ struct cs35l41_private {
764764
int irq;
765765
/* GPIO for /RST */
766766
struct gpio_desc *reset_gpio;
767-
void (*otp_setup)(struct cs35l41_private *cs35l41, bool is_pre_setup,
768-
unsigned int *freq);
769767
};
770768

771769
int cs35l41_probe(struct cs35l41_private *cs35l41,

sound/soc/codecs/rk817_codec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,3 +539,4 @@ module_platform_driver(rk817_codec_driver);
539539
MODULE_DESCRIPTION("ASoC RK817 codec driver");
540540
MODULE_AUTHOR("binyuan <[email protected]>");
541541
MODULE_LICENSE("GPL v2");
542+
MODULE_ALIAS("platform:rk817-codec");

0 commit comments

Comments
 (0)