aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/patch_realtek.c42
-rw-r--r--sound/soc/generic/simple-card.c2
-rw-r--r--sound/soc/samsung/i2s.c8
-rw-r--r--sound/soc/soc-topology.c8
4 files changed, 56 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 6df758adff84..1ffa36e987b4 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1855,6 +1855,8 @@ enum {
1855 ALC887_FIXUP_BASS_CHMAP, 1855 ALC887_FIXUP_BASS_CHMAP,
1856 ALC1220_FIXUP_GB_DUAL_CODECS, 1856 ALC1220_FIXUP_GB_DUAL_CODECS,
1857 ALC1220_FIXUP_CLEVO_P950, 1857 ALC1220_FIXUP_CLEVO_P950,
1858 ALC1220_FIXUP_SYSTEM76_ORYP5,
1859 ALC1220_FIXUP_SYSTEM76_ORYP5_PINS,
1858}; 1860};
1859 1861
1860static void alc889_fixup_coef(struct hda_codec *codec, 1862static void alc889_fixup_coef(struct hda_codec *codec,
@@ -2056,6 +2058,17 @@ static void alc1220_fixup_clevo_p950(struct hda_codec *codec,
2056 snd_hda_override_conn_list(codec, 0x1b, 1, conn1); 2058 snd_hda_override_conn_list(codec, 0x1b, 1, conn1);
2057} 2059}
2058 2060
2061static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec,
2062 const struct hda_fixup *fix, int action);
2063
2064static void alc1220_fixup_system76_oryp5(struct hda_codec *codec,
2065 const struct hda_fixup *fix,
2066 int action)
2067{
2068 alc1220_fixup_clevo_p950(codec, fix, action);
2069 alc_fixup_headset_mode_no_hp_mic(codec, fix, action);
2070}
2071
2059static const struct hda_fixup alc882_fixups[] = { 2072static const struct hda_fixup alc882_fixups[] = {
2060 [ALC882_FIXUP_ABIT_AW9D_MAX] = { 2073 [ALC882_FIXUP_ABIT_AW9D_MAX] = {
2061 .type = HDA_FIXUP_PINS, 2074 .type = HDA_FIXUP_PINS,
@@ -2300,6 +2313,19 @@ static const struct hda_fixup alc882_fixups[] = {
2300 .type = HDA_FIXUP_FUNC, 2313 .type = HDA_FIXUP_FUNC,
2301 .v.func = alc1220_fixup_clevo_p950, 2314 .v.func = alc1220_fixup_clevo_p950,
2302 }, 2315 },
2316 [ALC1220_FIXUP_SYSTEM76_ORYP5] = {
2317 .type = HDA_FIXUP_FUNC,
2318 .v.func = alc1220_fixup_system76_oryp5,
2319 },
2320 [ALC1220_FIXUP_SYSTEM76_ORYP5_PINS] = {
2321 .type = HDA_FIXUP_PINS,
2322 .v.pins = (const struct hda_pintbl[]) {
2323 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
2324 {}
2325 },
2326 .chained = true,
2327 .chain_id = ALC1220_FIXUP_SYSTEM76_ORYP5,
2328 },
2303}; 2329};
2304 2330
2305static const struct snd_pci_quirk alc882_fixup_tbl[] = { 2331static const struct snd_pci_quirk alc882_fixup_tbl[] = {
@@ -2376,6 +2402,8 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
2376 SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950), 2402 SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950),
2377 SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950), 2403 SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950),
2378 SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950), 2404 SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950),
2405 SND_PCI_QUIRK(0x1558, 0x96e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_SYSTEM76_ORYP5_PINS),
2406 SND_PCI_QUIRK(0x1558, 0x97e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_SYSTEM76_ORYP5_PINS),
2379 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), 2407 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
2380 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD), 2408 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
2381 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530), 2409 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530),
@@ -5632,6 +5660,7 @@ enum {
5632 ALC294_FIXUP_ASUS_SPK, 5660 ALC294_FIXUP_ASUS_SPK,
5633 ALC225_FIXUP_HEADSET_JACK, 5661 ALC225_FIXUP_HEADSET_JACK,
5634 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE, 5662 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
5663 ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
5635}; 5664};
5636 5665
5637static const struct hda_fixup alc269_fixups[] = { 5666static const struct hda_fixup alc269_fixups[] = {
@@ -6587,6 +6616,17 @@ static const struct hda_fixup alc269_fixups[] = {
6587 .chained = true, 6616 .chained = true,
6588 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 6617 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6589 }, 6618 },
6619 [ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE] = {
6620 .type = HDA_FIXUP_VERBS,
6621 .v.verbs = (const struct hda_verb[]) {
6622 /* Disable PCBEEP-IN passthrough */
6623 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
6624 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
6625 { }
6626 },
6627 .chained = true,
6628 .chain_id = ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
6629 },
6590}; 6630};
6591 6631
6592static const struct snd_pci_quirk alc269_fixup_tbl[] = { 6632static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -7272,7 +7312,7 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
7272 {0x12, 0x90a60130}, 7312 {0x12, 0x90a60130},
7273 {0x19, 0x03a11020}, 7313 {0x19, 0x03a11020},
7274 {0x21, 0x0321101f}), 7314 {0x21, 0x0321101f}),
7275 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_HEADPHONE_NOISE, 7315 SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
7276 {0x12, 0x90a60130}, 7316 {0x12, 0x90a60130},
7277 {0x14, 0x90170110}, 7317 {0x14, 0x90170110},
7278 {0x19, 0x04a11040}, 7318 {0x19, 0x04a11040},
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 37e001cf9cd1..3fe34417ec89 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -462,7 +462,7 @@ static int asoc_simple_card_parse_of(struct simple_card_data *priv)
462 conf_idx = 0; 462 conf_idx = 0;
463 node = of_get_child_by_name(top, PREFIX "dai-link"); 463 node = of_get_child_by_name(top, PREFIX "dai-link");
464 if (!node) { 464 if (!node) {
465 node = dev->of_node; 465 node = of_node_get(top);
466 loop = 0; 466 loop = 0;
467 } 467 }
468 468
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index ce00fe2f6aae..d4bde4834ce5 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -604,6 +604,7 @@ static int i2s_set_fmt(struct snd_soc_dai *dai,
604 unsigned int fmt) 604 unsigned int fmt)
605{ 605{
606 struct i2s_dai *i2s = to_info(dai); 606 struct i2s_dai *i2s = to_info(dai);
607 struct i2s_dai *other = get_other_dai(i2s);
607 int lrp_shift, sdf_shift, sdf_mask, lrp_rlow, mod_slave; 608 int lrp_shift, sdf_shift, sdf_mask, lrp_rlow, mod_slave;
608 u32 mod, tmp = 0; 609 u32 mod, tmp = 0;
609 unsigned long flags; 610 unsigned long flags;
@@ -661,7 +662,8 @@ static int i2s_set_fmt(struct snd_soc_dai *dai,
661 * CLK_I2S_RCLK_SRC clock is not exposed so we ensure any 662 * CLK_I2S_RCLK_SRC clock is not exposed so we ensure any
662 * clock configuration assigned in DT is not overwritten. 663 * clock configuration assigned in DT is not overwritten.
663 */ 664 */
664 if (i2s->rclk_srcrate == 0 && i2s->clk_data.clks == NULL) 665 if (i2s->rclk_srcrate == 0 && i2s->clk_data.clks == NULL &&
666 other->clk_data.clks == NULL)
665 i2s_set_sysclk(dai, SAMSUNG_I2S_RCLKSRC_0, 667 i2s_set_sysclk(dai, SAMSUNG_I2S_RCLKSRC_0,
666 0, SND_SOC_CLOCK_IN); 668 0, SND_SOC_CLOCK_IN);
667 break; 669 break;
@@ -699,6 +701,7 @@ static int i2s_hw_params(struct snd_pcm_substream *substream,
699 struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) 701 struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
700{ 702{
701 struct i2s_dai *i2s = to_info(dai); 703 struct i2s_dai *i2s = to_info(dai);
704 struct i2s_dai *other = get_other_dai(i2s);
702 u32 mod, mask = 0, val = 0; 705 u32 mod, mask = 0, val = 0;
703 struct clk *rclksrc; 706 struct clk *rclksrc;
704 unsigned long flags; 707 unsigned long flags;
@@ -784,6 +787,9 @@ static int i2s_hw_params(struct snd_pcm_substream *substream,
784 i2s->frmclk = params_rate(params); 787 i2s->frmclk = params_rate(params);
785 788
786 rclksrc = i2s->clk_table[CLK_I2S_RCLK_SRC]; 789 rclksrc = i2s->clk_table[CLK_I2S_RCLK_SRC];
790 if (!rclksrc || IS_ERR(rclksrc))
791 rclksrc = other->clk_table[CLK_I2S_RCLK_SRC];
792
787 if (rclksrc && !IS_ERR(rclksrc)) 793 if (rclksrc && !IS_ERR(rclksrc))
788 i2s->rclk_srcrate = clk_get_rate(rclksrc); 794 i2s->rclk_srcrate = clk_get_rate(rclksrc);
789 795
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index fc79ec6927e3..731b963b6995 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -2487,6 +2487,7 @@ int snd_soc_tplg_component_load(struct snd_soc_component *comp,
2487 struct snd_soc_tplg_ops *ops, const struct firmware *fw, u32 id) 2487 struct snd_soc_tplg_ops *ops, const struct firmware *fw, u32 id)
2488{ 2488{
2489 struct soc_tplg tplg; 2489 struct soc_tplg tplg;
2490 int ret;
2490 2491
2491 /* setup parsing context */ 2492 /* setup parsing context */
2492 memset(&tplg, 0, sizeof(tplg)); 2493 memset(&tplg, 0, sizeof(tplg));
@@ -2500,7 +2501,12 @@ int snd_soc_tplg_component_load(struct snd_soc_component *comp,
2500 tplg.bytes_ext_ops = ops->bytes_ext_ops; 2501 tplg.bytes_ext_ops = ops->bytes_ext_ops;
2501 tplg.bytes_ext_ops_count = ops->bytes_ext_ops_count; 2502 tplg.bytes_ext_ops_count = ops->bytes_ext_ops_count;
2502 2503
2503 return soc_tplg_load(&tplg); 2504 ret = soc_tplg_load(&tplg);
2505 /* free the created components if fail to load topology */
2506 if (ret)
2507 snd_soc_tplg_component_remove(comp, SND_SOC_TPLG_INDEX_ALL);
2508
2509 return ret;
2504} 2510}
2505EXPORT_SYMBOL_GPL(snd_soc_tplg_component_load); 2511EXPORT_SYMBOL_GPL(snd_soc_tplg_component_load);
2506 2512