Skip to content

Commit 372686e

Browse files
committed
Merge tag 'sound-5.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Well, this one became unpleasantly larger than previous pull requests, but it's a kind of usual pattern: now it contains a collection of ASoC fixes, and nothing to worry too much. The fixes for ASoC core (DAPM, DPCM, topology) are all small and just covering corner cases. The rest changes are driver-specific, many of which are for x86 platforms and new drivers like STM32, in addition to the usual fixups for HD-audio" * tag 'sound-5.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (66 commits) ASoC: wcd9335: Fix missing regmap requirement ALSA: hda: Fix racy display power access ASoC: pcm: fix error handling when try_module_get() fails. ASoC: stm32: sai: fix master clock management ASoC: Intel: kbl: fix wrong number of channels ALSA: hda - Add two more machines to the power_save_blacklist ASoC: pcm: update module refcount if module_get_upon_open is set ASoC: core: conditionally increase module refcount on component open ASoC: stm32: fix sai driver name initialisation ASoC: topology: Use the correct dobj to free enum control values and texts ALSA: seq: Fix OOB-reads from strlcpy ASoC: intel: skylake: add remove() callback for component driver ASoC: cs35l35: Disable regulators on driver removal ALSA: xen-front: Do not use stream buffer size before it is set ASoC: rockchip: pdm: change dma burst to 8 ASoC: rockchip: pdm: fix regmap_ops hang issue ASoC: simple-card: don't select DPCM via simple-audio-card ASoC: audio-graph-card: don't select DPCM via audio-graph-card ASoC: tlv320aic32x4: Change author's name ALSA: hda/realtek - Add quirk for Tuxedo XC 1509 ...
2 parents f2a7346 + 9b0dcd0 commit 372686e

50 files changed

Lines changed: 734 additions & 262 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎include/sound/soc.h‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,13 @@ struct snd_soc_component_driver {
802802
int probe_order;
803803
int remove_order;
804804

805-
/* signal if the module handling the component cannot be removed */
806-
unsigned int ignore_module_refcount:1;
805+
/*
806+
* signal if the module handling the component should not be removed
807+
* if a pcm is open. Setting this would prevent the module
808+
* refcount being incremented in probe() but allow it be incremented
809+
* when a pcm is opened and decremented when it is closed.
810+
*/
811+
unsigned int module_get_upon_open:1;
807812

808813
/* bits */
809814
unsigned int idle_bias_on:1;
@@ -1083,6 +1088,8 @@ struct snd_soc_card {
10831088
struct mutex mutex;
10841089
struct mutex dapm_mutex;
10851090

1091+
spinlock_t dpcm_lock;
1092+
10861093
bool instantiated;
10871094
bool topology_shortname_created;
10881095

‎include/uapi/sound/asound.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
#ifndef __KERNEL__
3434
#include <stdlib.h>
35+
#include <time.h>
3536
#endif
3637

3738
/*

‎sound/core/seq/seq_clientmgr.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ static int snd_seq_ioctl_set_client_info(struct snd_seq_client *client,
12521252

12531253
/* fill the info fields */
12541254
if (client_info->name[0])
1255-
strlcpy(client->name, client_info->name, sizeof(client->name));
1255+
strscpy(client->name, client_info->name, sizeof(client->name));
12561256

12571257
client->filter = client_info->filter;
12581258
client->event_lost = client_info->event_lost;
@@ -1530,7 +1530,7 @@ static int snd_seq_ioctl_create_queue(struct snd_seq_client *client, void *arg)
15301530
/* set queue name */
15311531
if (!info->name[0])
15321532
snprintf(info->name, sizeof(info->name), "Queue-%d", q->queue);
1533-
strlcpy(q->name, info->name, sizeof(q->name));
1533+
strscpy(q->name, info->name, sizeof(q->name));
15341534
snd_use_lock_free(&q->use_lock);
15351535

15361536
return 0;
@@ -1592,7 +1592,7 @@ static int snd_seq_ioctl_set_queue_info(struct snd_seq_client *client,
15921592
queuefree(q);
15931593
return -EPERM;
15941594
}
1595-
strlcpy(q->name, info->name, sizeof(q->name));
1595+
strscpy(q->name, info->name, sizeof(q->name));
15961596
queuefree(q);
15971597

15981598
return 0;

‎sound/hda/ext/hdac_ext_bus.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ int snd_hdac_ext_bus_init(struct hdac_bus *bus, struct device *dev,
107107
INIT_LIST_HEAD(&bus->hlink_list);
108108
bus->idx = idx++;
109109

110-
mutex_init(&bus->lock);
111110
bus->cmd_dma_state = true;
112111

113112
return 0;

‎sound/hda/hdac_bus.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev,
3838
INIT_WORK(&bus->unsol_work, snd_hdac_bus_process_unsol_events);
3939
spin_lock_init(&bus->reg_lock);
4040
mutex_init(&bus->cmd_mutex);
41+
mutex_init(&bus->lock);
4142
bus->irq = -1;
4243
return 0;
4344
}

‎sound/hda/hdac_component.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ void snd_hdac_display_power(struct hdac_bus *bus, unsigned int idx, bool enable)
6969

7070
dev_dbg(bus->dev, "display power %s\n",
7171
enable ? "enable" : "disable");
72+
73+
mutex_lock(&bus->lock);
7274
if (enable)
7375
set_bit(idx, &bus->display_power_status);
7476
else
7577
clear_bit(idx, &bus->display_power_status);
7678

7779
if (!acomp || !acomp->ops)
78-
return;
80+
goto unlock;
7981

8082
if (bus->display_power_status) {
8183
if (!bus->display_power_active) {
@@ -92,6 +94,8 @@ void snd_hdac_display_power(struct hdac_bus *bus, unsigned int idx, bool enable)
9294
bus->display_power_active = false;
9395
}
9496
}
97+
unlock:
98+
mutex_unlock(&bus->lock);
9599
}
96100
EXPORT_SYMBOL_GPL(snd_hdac_display_power);
97101

‎sound/pci/hda/hda_intel.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,6 +2142,8 @@ static struct snd_pci_quirk power_save_blacklist[] = {
21422142
SND_PCI_QUIRK(0x8086, 0x2040, "Intel DZ77BH-55K", 0),
21432143
/* https://bugzilla.kernel.org/show_bug.cgi?id=199607 */
21442144
SND_PCI_QUIRK(0x8086, 0x2057, "Intel NUC5i7RYB", 0),
2145+
/* https://bugs.launchpad.net/bugs/1821663 */
2146+
SND_PCI_QUIRK(0x8086, 0x2064, "Intel SDP 8086:2064", 0),
21452147
/* https://bugzilla.redhat.com/show_bug.cgi?id=1520902 */
21462148
SND_PCI_QUIRK(0x8086, 0x2068, "Intel NUC7i3BNB", 0),
21472149
/* https://bugzilla.kernel.org/show_bug.cgi?id=198611 */
@@ -2150,6 +2152,8 @@ static struct snd_pci_quirk power_save_blacklist[] = {
21502152
SND_PCI_QUIRK(0x17aa, 0x367b, "Lenovo IdeaCentre B550", 0),
21512153
/* https://bugzilla.redhat.com/show_bug.cgi?id=1572975 */
21522154
SND_PCI_QUIRK(0x17aa, 0x36a7, "Lenovo C50 All in one", 0),
2155+
/* https://bugs.launchpad.net/bugs/1821663 */
2156+
SND_PCI_QUIRK(0x1631, 0xe017, "Packard Bell NEC IMEDIA 5204", 0),
21532157
{}
21542158
};
21552159
#endif /* CONFIG_PM */

‎sound/pci/hda/patch_realtek.c‎

Lines changed: 51 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,8 +1864,8 @@ enum {
18641864
ALC887_FIXUP_BASS_CHMAP,
18651865
ALC1220_FIXUP_GB_DUAL_CODECS,
18661866
ALC1220_FIXUP_CLEVO_P950,
1867-
ALC1220_FIXUP_SYSTEM76_ORYP5,
1868-
ALC1220_FIXUP_SYSTEM76_ORYP5_PINS,
1867+
ALC1220_FIXUP_CLEVO_PB51ED,
1868+
ALC1220_FIXUP_CLEVO_PB51ED_PINS,
18691869
};
18701870

18711871
static void alc889_fixup_coef(struct hda_codec *codec,
@@ -2070,7 +2070,7 @@ static void alc1220_fixup_clevo_p950(struct hda_codec *codec,
20702070
static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec,
20712071
const struct hda_fixup *fix, int action);
20722072

2073-
static void alc1220_fixup_system76_oryp5(struct hda_codec *codec,
2073+
static void alc1220_fixup_clevo_pb51ed(struct hda_codec *codec,
20742074
const struct hda_fixup *fix,
20752075
int action)
20762076
{
@@ -2322,18 +2322,18 @@ static const struct hda_fixup alc882_fixups[] = {
23222322
.type = HDA_FIXUP_FUNC,
23232323
.v.func = alc1220_fixup_clevo_p950,
23242324
},
2325-
[ALC1220_FIXUP_SYSTEM76_ORYP5] = {
2325+
[ALC1220_FIXUP_CLEVO_PB51ED] = {
23262326
.type = HDA_FIXUP_FUNC,
2327-
.v.func = alc1220_fixup_system76_oryp5,
2327+
.v.func = alc1220_fixup_clevo_pb51ed,
23282328
},
2329-
[ALC1220_FIXUP_SYSTEM76_ORYP5_PINS] = {
2329+
[ALC1220_FIXUP_CLEVO_PB51ED_PINS] = {
23302330
.type = HDA_FIXUP_PINS,
23312331
.v.pins = (const struct hda_pintbl[]) {
23322332
{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
23332333
{}
23342334
},
23352335
.chained = true,
2336-
.chain_id = ALC1220_FIXUP_SYSTEM76_ORYP5,
2336+
.chain_id = ALC1220_FIXUP_CLEVO_PB51ED,
23372337
},
23382338
};
23392339

@@ -2411,8 +2411,9 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
24112411
SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950),
24122412
SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950),
24132413
SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950),
2414-
SND_PCI_QUIRK(0x1558, 0x96e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_SYSTEM76_ORYP5_PINS),
2415-
SND_PCI_QUIRK(0x1558, 0x97e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_SYSTEM76_ORYP5_PINS),
2414+
SND_PCI_QUIRK(0x1558, 0x96e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2415+
SND_PCI_QUIRK(0x1558, 0x97e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2416+
SND_PCI_QUIRK(0x1558, 0x65d1, "Tuxedo Book XC1509", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
24162417
SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
24172418
SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
24182419
SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530),
@@ -5491,7 +5492,7 @@ static void alc_headset_btn_callback(struct hda_codec *codec,
54915492
jack->jack->button_state = report;
54925493
}
54935494

5494-
static void alc295_fixup_chromebook(struct hda_codec *codec,
5495+
static void alc_fixup_headset_jack(struct hda_codec *codec,
54955496
const struct hda_fixup *fix, int action)
54965497
{
54975498

@@ -5501,16 +5502,6 @@ static void alc295_fixup_chromebook(struct hda_codec *codec,
55015502
alc_headset_btn_callback);
55025503
snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack", false,
55035504
SND_JACK_HEADSET, alc_headset_btn_keymap);
5504-
switch (codec->core.vendor_id) {
5505-
case 0x10ec0295:
5506-
alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
5507-
alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15);
5508-
break;
5509-
case 0x10ec0236:
5510-
alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
5511-
alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
5512-
break;
5513-
}
55145505
break;
55155506
case HDA_FIXUP_ACT_INIT:
55165507
switch (codec->core.vendor_id) {
@@ -5531,6 +5522,25 @@ static void alc295_fixup_chromebook(struct hda_codec *codec,
55315522
}
55325523
}
55335524

5525+
static void alc295_fixup_chromebook(struct hda_codec *codec,
5526+
const struct hda_fixup *fix, int action)
5527+
{
5528+
switch (action) {
5529+
case HDA_FIXUP_ACT_INIT:
5530+
switch (codec->core.vendor_id) {
5531+
case 0x10ec0295:
5532+
alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
5533+
alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15);
5534+
break;
5535+
case 0x10ec0236:
5536+
alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
5537+
alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
5538+
break;
5539+
}
5540+
break;
5541+
}
5542+
}
5543+
55345544
static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
55355545
const struct hda_fixup *fix, int action)
55365546
{
@@ -5663,6 +5673,7 @@ enum {
56635673
ALC233_FIXUP_ASUS_MIC_NO_PRESENCE,
56645674
ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE,
56655675
ALC233_FIXUP_LENOVO_MULTI_CODECS,
5676+
ALC233_FIXUP_ACER_HEADSET_MIC,
56665677
ALC294_FIXUP_LENOVO_MIC_LOCATION,
56675678
ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE,
56685679
ALC700_FIXUP_INTEL_REFERENCE,
@@ -5684,6 +5695,7 @@ enum {
56845695
ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
56855696
ALC255_FIXUP_ACER_HEADSET_MIC,
56865697
ALC295_FIXUP_CHROME_BOOK,
5698+
ALC225_FIXUP_HEADSET_JACK,
56875699
ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE,
56885700
ALC225_FIXUP_WYSE_AUTO_MUTE,
56895701
ALC225_FIXUP_WYSE_DISABLE_MIC_VREF,
@@ -6490,6 +6502,16 @@ static const struct hda_fixup alc269_fixups[] = {
64906502
.type = HDA_FIXUP_FUNC,
64916503
.v.func = alc233_alc662_fixup_lenovo_dual_codecs,
64926504
},
6505+
[ALC233_FIXUP_ACER_HEADSET_MIC] = {
6506+
.type = HDA_FIXUP_VERBS,
6507+
.v.verbs = (const struct hda_verb[]) {
6508+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
6509+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
6510+
{ }
6511+
},
6512+
.chained = true,
6513+
.chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
6514+
},
64936515
[ALC294_FIXUP_LENOVO_MIC_LOCATION] = {
64946516
.type = HDA_FIXUP_PINS,
64956517
.v.pins = (const struct hda_pintbl[]) {
@@ -6635,6 +6657,12 @@ static const struct hda_fixup alc269_fixups[] = {
66356657
[ALC295_FIXUP_CHROME_BOOK] = {
66366658
.type = HDA_FIXUP_FUNC,
66376659
.v.func = alc295_fixup_chromebook,
6660+
.chained = true,
6661+
.chain_id = ALC225_FIXUP_HEADSET_JACK
6662+
},
6663+
[ALC225_FIXUP_HEADSET_JACK] = {
6664+
.type = HDA_FIXUP_FUNC,
6665+
.v.func = alc_fixup_headset_jack,
66386666
},
66396667
[ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
66406668
.type = HDA_FIXUP_PINS,
@@ -6737,6 +6765,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
67376765
SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
67386766
SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
67396767
SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
6768+
SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
67406769
SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
67416770
SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
67426771
SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
@@ -7132,7 +7161,8 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
71327161
{.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
71337162
{.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
71347163
{.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
7135-
{.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-sense-combo"},
7164+
{.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"},
7165+
{.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"},
71367166
{.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"},
71377167
{}
71387168
};

‎sound/soc/codecs/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,7 @@ config SND_SOC_WCD9335
11511151
tristate "WCD9335 Codec"
11521152
depends on SLIMBUS
11531153
select REGMAP_SLIMBUS
1154+
select REGMAP_IRQ
11541155
help
11551156
The WCD9335 is a standalone Hi-Fi audio CODEC IC, supports
11561157
Qualcomm Technologies, Inc. (QTI) multimedia solutions,

‎sound/soc/codecs/ab8500-codec.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,6 +2129,7 @@ static int ab8500_codec_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
21292129
dev_err(dai->component->dev,
21302130
"%s: ERROR: The device is either a master or a slave.\n",
21312131
__func__);
2132+
/* fall through */
21322133
default:
21332134
dev_err(dai->component->dev,
21342135
"%s: ERROR: Unsupporter master mask 0x%x\n",

0 commit comments

Comments
 (0)