Skip to content

Commit 8e37395

Browse files
committed
Merge tag 'sound-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Again it became bigger than wished, unfortunately, as this contains quite a few ASoC fixes that came up a bit late. It also includes yet more HD- and USB-audio quirks: I decided to merge them now, as those are for stable, and we'll need them sooner or later. Although the volumes are a bit high, all changes are device-specific (and reasonably small) fixes, so it should be safe for the late rc" * tag 'sound-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Fix microphone sound on Jieli webcam. ALSA: hda/realtek: Fixes HP Spectre x360 15-eb1xxx speakers ALSA: usb-audio: Provide quirk for Sennheiser GSP670 Headset ALSA: hda/realtek: Add quirk for Clevo PC50HS ALSA: usb-audio: add Schiit Hel device to quirk table ASoC: wm8960: Fix clock configuration on slave mode ASoC: cs42l42: Ensure 0dB full scale volume is used for headsets ASoC: soc-core: fix null-ptr-deref in snd_soc_del_component_unlocked() ASoC: codec: wcd938x: Add irq config support ASoC: DAPM: Fix missing kctl change notifications ASoC: Intel: bytcht_es8316: Utilize dev_err_probe() to avoid log saturation ASoC: Intel: bytcht_es8316: Switch to use gpiod_get_optional() ASoC: Intel: bytcht_es8316: Use temporary variable for struct device ASoC: Intel: bytcht_es8316: Get platform data via dev_get_platdata() ASoC: wcd938x: Fix jack detection issue ASoC: nau8824: Fix headphone vs headset, button-press detection no longer working ASoC: cs4341: Add SPI device ID table ASoC: pcm179x: Add missing entries SPI to device ID table ASoC: fsl_xcvr: Fix channel swap issue with ARC ASoC: pcm512x: Mend accesses to the I2S_1 and I2S_2 registers
2 parents 6da52de + 2966492 commit 8e37395

File tree

16 files changed

+157
-56
lines changed

16 files changed

+157
-56
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2535,6 +2535,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
25352535
SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25362536
SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25372537
SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2538+
SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25382539
SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25392540
SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
25402541
SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
@@ -6405,6 +6406,44 @@ static void alc_fixup_no_int_mic(struct hda_codec *codec,
64056406
}
64066407
}
64076408

6409+
/* GPIO1 = amplifier on/off
6410+
* GPIO3 = mic mute LED
6411+
*/
6412+
static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
6413+
const struct hda_fixup *fix, int action)
6414+
{
6415+
static const hda_nid_t conn[] = { 0x02 };
6416+
6417+
struct alc_spec *spec = codec->spec;
6418+
static const struct hda_pintbl pincfgs[] = {
6419+
{ 0x14, 0x90170110 }, /* front/high speakers */
6420+
{ 0x17, 0x90170130 }, /* back/bass speakers */
6421+
{ }
6422+
};
6423+
6424+
//enable micmute led
6425+
alc_fixup_hp_gpio_led(codec, action, 0x00, 0x04);
6426+
6427+
switch (action) {
6428+
case HDA_FIXUP_ACT_PRE_PROBE:
6429+
spec->micmute_led_polarity = 1;
6430+
/* needed for amp of back speakers */
6431+
spec->gpio_mask |= 0x01;
6432+
spec->gpio_dir |= 0x01;
6433+
snd_hda_apply_pincfgs(codec, pincfgs);
6434+
/* share DAC to have unified volume control */
6435+
snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
6436+
snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6437+
break;
6438+
case HDA_FIXUP_ACT_INIT:
6439+
/* need to toggle GPIO to enable the amp of back speakers */
6440+
alc_update_gpio_data(codec, 0x01, true);
6441+
msleep(100);
6442+
alc_update_gpio_data(codec, 0x01, false);
6443+
break;
6444+
}
6445+
}
6446+
64086447
static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
64096448
const struct hda_fixup *fix, int action)
64106449
{
@@ -6557,6 +6596,7 @@ enum {
65576596
ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED,
65586597
ALC280_FIXUP_HP_9480M,
65596598
ALC245_FIXUP_HP_X360_AMP,
6599+
ALC285_FIXUP_HP_SPECTRE_X360_EB1,
65606600
ALC288_FIXUP_DELL_HEADSET_MODE,
65616601
ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
65626602
ALC288_FIXUP_DELL_XPS_13,
@@ -8250,6 +8290,10 @@ static const struct hda_fixup alc269_fixups[] = {
82508290
.type = HDA_FIXUP_FUNC,
82518291
.v.func = alc285_fixup_hp_spectre_x360,
82528292
},
8293+
[ALC285_FIXUP_HP_SPECTRE_X360_EB1] = {
8294+
.type = HDA_FIXUP_FUNC,
8295+
.v.func = alc285_fixup_hp_spectre_x360_eb1
8296+
},
82538297
[ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = {
82548298
.type = HDA_FIXUP_FUNC,
82558299
.v.func = alc285_fixup_ideapad_s740_coef,
@@ -8584,6 +8628,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
85848628
SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
85858629
SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
85868630
SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
8631+
SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
8632+
SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
85878633
SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
85888634
SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
85898635
SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
@@ -9005,6 +9051,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
90059051
{.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"},
90069052
{.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
90079053
{.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
9054+
{.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
90089055
{.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
90099056
{.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
90109057
{.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"},

sound/soc/codecs/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,7 @@ config SND_SOC_WCD938X_SDW
15831583
tristate "WCD9380/WCD9385 Codec - SDW"
15841584
select SND_SOC_WCD938X
15851585
select SND_SOC_WCD_MBHC
1586+
select REGMAP_IRQ
15861587
depends on SOUNDWIRE
15871588
select REGMAP_SOUNDWIRE
15881589
help

sound/soc/codecs/cs42l42.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,6 @@ static int cs42l42_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
922922
struct snd_soc_component *component = dai->component;
923923
struct cs42l42_private *cs42l42 = snd_soc_component_get_drvdata(component);
924924
unsigned int regval;
925-
u8 fullScaleVol;
926925
int ret;
927926

928927
if (mute) {
@@ -993,20 +992,11 @@ static int cs42l42_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
993992
cs42l42->stream_use |= 1 << stream;
994993

995994
if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
996-
/* Read the headphone load */
997-
regval = snd_soc_component_read(component, CS42L42_LOAD_DET_RCSTAT);
998-
if (((regval & CS42L42_RLA_STAT_MASK) >> CS42L42_RLA_STAT_SHIFT) ==
999-
CS42L42_RLA_STAT_15_OHM) {
1000-
fullScaleVol = CS42L42_HP_FULL_SCALE_VOL_MASK;
1001-
} else {
1002-
fullScaleVol = 0;
1003-
}
1004-
1005-
/* Un-mute the headphone, set the full scale volume flag */
995+
/* Un-mute the headphone */
1006996
snd_soc_component_update_bits(component, CS42L42_HP_CTL,
1007997
CS42L42_HP_ANA_AMUTE_MASK |
1008-
CS42L42_HP_ANA_BMUTE_MASK |
1009-
CS42L42_HP_FULL_SCALE_VOL_MASK, fullScaleVol);
998+
CS42L42_HP_ANA_BMUTE_MASK,
999+
0);
10101000
}
10111001
}
10121002

sound/soc/codecs/cs4341.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,19 @@ static int cs4341_spi_probe(struct spi_device *spi)
305305
return cs4341_probe(&spi->dev);
306306
}
307307

308+
static const struct spi_device_id cs4341_spi_ids[] = {
309+
{ "cs4341a" },
310+
{ }
311+
};
312+
MODULE_DEVICE_TABLE(spi, cs4341_spi_ids);
313+
308314
static struct spi_driver cs4341_spi_driver = {
309315
.driver = {
310316
.name = "cs4341-spi",
311317
.of_match_table = of_match_ptr(cs4341_dt_ids),
312318
},
313319
.probe = cs4341_spi_probe,
320+
.id_table = cs4341_spi_ids,
314321
};
315322
#endif
316323

sound/soc/codecs/nau8824.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,8 +867,8 @@ static void nau8824_jdet_work(struct work_struct *work)
867867
struct regmap *regmap = nau8824->regmap;
868868
int adc_value, event = 0, event_mask = 0;
869869

870-
snd_soc_dapm_enable_pin(dapm, "MICBIAS");
871-
snd_soc_dapm_enable_pin(dapm, "SAR");
870+
snd_soc_dapm_force_enable_pin(dapm, "MICBIAS");
871+
snd_soc_dapm_force_enable_pin(dapm, "SAR");
872872
snd_soc_dapm_sync(dapm);
873873

874874
msleep(100);

sound/soc/codecs/pcm179x-spi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ static const struct of_device_id pcm179x_of_match[] = {
3636
MODULE_DEVICE_TABLE(of, pcm179x_of_match);
3737

3838
static const struct spi_device_id pcm179x_spi_ids[] = {
39+
{ "pcm1792a", 0 },
3940
{ "pcm179x", 0 },
4041
{ },
4142
};

sound/soc/codecs/pcm512x.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ static const struct reg_default pcm512x_reg_defaults[] = {
116116
{ PCM512x_FS_SPEED_MODE, 0x00 },
117117
{ PCM512x_IDAC_1, 0x01 },
118118
{ PCM512x_IDAC_2, 0x00 },
119+
{ PCM512x_I2S_1, 0x02 },
120+
{ PCM512x_I2S_2, 0x00 },
119121
};
120122

121123
static bool pcm512x_readable(struct device *dev, unsigned int reg)

sound/soc/codecs/wcd938x.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4144,10 +4144,10 @@ static int wcd938x_codec_set_jack(struct snd_soc_component *comp,
41444144
{
41454145
struct wcd938x_priv *wcd = dev_get_drvdata(comp->dev);
41464146

4147-
if (!jack)
4147+
if (jack)
41484148
return wcd_mbhc_start(wcd->wcd_mbhc, &wcd->mbhc_cfg, jack);
4149-
4150-
wcd_mbhc_stop(wcd->wcd_mbhc);
4149+
else
4150+
wcd_mbhc_stop(wcd->wcd_mbhc);
41514151

41524152
return 0;
41534153
}

sound/soc/codecs/wm8960.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -742,9 +742,16 @@ static int wm8960_configure_clocking(struct snd_soc_component *component)
742742
int i, j, k;
743743
int ret;
744744

745-
if (!(iface1 & (1<<6))) {
746-
dev_dbg(component->dev,
747-
"Codec is slave mode, no need to configure clock\n");
745+
/*
746+
* For Slave mode clocking should still be configured,
747+
* so this if statement should be removed, but some platform
748+
* may not work if the sysclk is not configured, to avoid such
749+
* compatible issue, just add '!wm8960->sysclk' condition in
750+
* this if statement.
751+
*/
752+
if (!(iface1 & (1 << 6)) && !wm8960->sysclk) {
753+
dev_warn(component->dev,
754+
"slave mode, but proceeding with no clock configuration\n");
748755
return 0;
749756
}
750757

sound/soc/fsl/fsl_xcvr.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,9 @@ static int fsl_xcvr_prepare(struct snd_pcm_substream *substream,
487487
return ret;
488488
}
489489

490-
/* clear DPATH RESET */
490+
/* set DPATH RESET */
491491
m_ctl |= FSL_XCVR_EXT_CTRL_DPTH_RESET(tx);
492+
v_ctl |= FSL_XCVR_EXT_CTRL_DPTH_RESET(tx);
492493
ret = regmap_update_bits(xcvr->regmap, FSL_XCVR_EXT_CTRL, m_ctl, v_ctl);
493494
if (ret < 0) {
494495
dev_err(dai->dev, "Error while setting EXT_CTRL: %d\n", ret);
@@ -590,10 +591,6 @@ static void fsl_xcvr_shutdown(struct snd_pcm_substream *substream,
590591
val |= FSL_XCVR_EXT_CTRL_CMDC_RESET(tx);
591592
}
592593

593-
/* set DPATH RESET */
594-
mask |= FSL_XCVR_EXT_CTRL_DPTH_RESET(tx);
595-
val |= FSL_XCVR_EXT_CTRL_DPTH_RESET(tx);
596-
597594
ret = regmap_update_bits(xcvr->regmap, FSL_XCVR_EXT_CTRL, mask, val);
598595
if (ret < 0) {
599596
dev_err(dai->dev, "Err setting DPATH RESET: %d\n", ret);
@@ -643,6 +640,16 @@ static int fsl_xcvr_trigger(struct snd_pcm_substream *substream, int cmd,
643640
dev_err(dai->dev, "Failed to enable DMA: %d\n", ret);
644641
return ret;
645642
}
643+
644+
/* clear DPATH RESET */
645+
ret = regmap_update_bits(xcvr->regmap, FSL_XCVR_EXT_CTRL,
646+
FSL_XCVR_EXT_CTRL_DPTH_RESET(tx),
647+
0);
648+
if (ret < 0) {
649+
dev_err(dai->dev, "Failed to clear DPATH RESET: %d\n", ret);
650+
return ret;
651+
}
652+
646653
break;
647654
case SNDRV_PCM_TRIGGER_STOP:
648655
case SNDRV_PCM_TRIGGER_SUSPEND:

0 commit comments

Comments
 (0)