Skip to content

Commit dcacc48

Browse files
committed
Merge tag 'sound-5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "The only significant change is the regression fixes for the jack detection at resume on HD-audio, while others are all small or trivial fixes like the coverage of missing error code or usual HD-audio quirk" * tag 'sound-5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Enable headset MIC of Acer AIO with ALC286 ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec ALSA: hda - Don't trigger jackpoll_work in azx_resume ALSA: opl3: fix mismatch between snd_opl3_drum_switch definition and declaration ALSA: hda - add Lenovo IdeaCentre B550 to the power_save_blacklist ALSA: firewire-motu: use 'version' field of unit directory to identify model ALSA: sb8: add a check for request_region ALSA: echoaudio: add a check for ioremap_nocache
2 parents e420917 + 667a8f7 commit dcacc48

File tree

7 files changed

+59
-23
lines changed

7 files changed

+59
-23
lines changed

sound/drivers/opl3/opl3_voice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void snd_opl3_timer_func(struct timer_list *t);
4141

4242
/* Prototypes for opl3_drums.c */
4343
void snd_opl3_load_drums(struct snd_opl3 *opl3);
44-
void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int on_off, int vel, struct snd_midi_channel *chan);
44+
void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int vel, int on_off, struct snd_midi_channel *chan);
4545

4646
/* Prototypes for opl3_oss.c */
4747
#if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS)

sound/firewire/motu/motu.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static void name_card(struct snd_motu *motu)
3636
fw_csr_iterator_init(&it, motu->unit->directory);
3737
while (fw_csr_iterator_next(&it, &key, &val)) {
3838
switch (key) {
39-
case CSR_VERSION:
39+
case CSR_MODEL:
4040
version = val;
4141
break;
4242
}
@@ -46,7 +46,7 @@ static void name_card(struct snd_motu *motu)
4646
strcpy(motu->card->shortname, motu->spec->name);
4747
strcpy(motu->card->mixername, motu->spec->name);
4848
snprintf(motu->card->longname, sizeof(motu->card->longname),
49-
"MOTU %s (version:%d), GUID %08x%08x at %s, S%d",
49+
"MOTU %s (version:%06x), GUID %08x%08x at %s, S%d",
5050
motu->spec->name, version,
5151
fw_dev->config_rom[3], fw_dev->config_rom[4],
5252
dev_name(&motu->unit->device), 100 << fw_dev->max_speed);
@@ -237,20 +237,20 @@ static const struct snd_motu_spec motu_audio_express = {
237237
#define SND_MOTU_DEV_ENTRY(model, data) \
238238
{ \
239239
.match_flags = IEEE1394_MATCH_VENDOR_ID | \
240-
IEEE1394_MATCH_MODEL_ID | \
241-
IEEE1394_MATCH_SPECIFIER_ID, \
240+
IEEE1394_MATCH_SPECIFIER_ID | \
241+
IEEE1394_MATCH_VERSION, \
242242
.vendor_id = OUI_MOTU, \
243-
.model_id = model, \
244243
.specifier_id = OUI_MOTU, \
244+
.version = model, \
245245
.driver_data = (kernel_ulong_t)data, \
246246
}
247247

248248
static const struct ieee1394_device_id motu_id_table[] = {
249-
SND_MOTU_DEV_ENTRY(0x101800, &motu_828mk2),
250-
SND_MOTU_DEV_ENTRY(0x107800, &snd_motu_spec_traveler),
251-
SND_MOTU_DEV_ENTRY(0x106800, &motu_828mk3), /* FireWire only. */
252-
SND_MOTU_DEV_ENTRY(0x100800, &motu_828mk3), /* Hybrid. */
253-
SND_MOTU_DEV_ENTRY(0x104800, &motu_audio_express),
249+
SND_MOTU_DEV_ENTRY(0x000003, &motu_828mk2),
250+
SND_MOTU_DEV_ENTRY(0x000009, &snd_motu_spec_traveler),
251+
SND_MOTU_DEV_ENTRY(0x000015, &motu_828mk3), /* FireWire only. */
252+
SND_MOTU_DEV_ENTRY(0x000035, &motu_828mk3), /* Hybrid. */
253+
SND_MOTU_DEV_ENTRY(0x000033, &motu_audio_express),
254254
{ }
255255
};
256256
MODULE_DEVICE_TABLE(ieee1394, motu_id_table);

sound/isa/sb/sb8.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ static int snd_sb8_probe(struct device *pdev, unsigned int dev)
111111

112112
/* block the 0x388 port to avoid PnP conflicts */
113113
acard->fm_res = request_region(0x388, 4, "SoundBlaster FM");
114+
if (!acard->fm_res) {
115+
err = -EBUSY;
116+
goto _err;
117+
}
114118

115119
if (port[dev] != SNDRV_AUTO_PORT) {
116120
if ((err = snd_sbdsp_create(card, port[dev], irq[dev],

sound/pci/echoaudio/echoaudio.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,6 +1952,11 @@ static int snd_echo_create(struct snd_card *card,
19521952
}
19531953
chip->dsp_registers = (volatile u32 __iomem *)
19541954
ioremap_nocache(chip->dsp_registers_phys, sz);
1955+
if (!chip->dsp_registers) {
1956+
dev_err(chip->card->dev, "ioremap failed\n");
1957+
snd_echo_free(chip);
1958+
return -ENOMEM;
1959+
}
19551960

19561961
if (request_irq(pci->irq, snd_echo_interrupt, IRQF_SHARED,
19571962
KBUILD_MODNAME, chip)) {

sound/pci/hda/hda_codec.c

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2939,6 +2939,20 @@ static int hda_codec_runtime_resume(struct device *dev)
29392939
#endif /* CONFIG_PM */
29402940

29412941
#ifdef CONFIG_PM_SLEEP
2942+
static int hda_codec_force_resume(struct device *dev)
2943+
{
2944+
int ret;
2945+
2946+
/* The get/put pair below enforces the runtime resume even if the
2947+
* device hasn't been used at suspend time. This trick is needed to
2948+
* update the jack state change during the sleep.
2949+
*/
2950+
pm_runtime_get_noresume(dev);
2951+
ret = pm_runtime_force_resume(dev);
2952+
pm_runtime_put(dev);
2953+
return ret;
2954+
}
2955+
29422956
static int hda_codec_pm_suspend(struct device *dev)
29432957
{
29442958
dev->power.power_state = PMSG_SUSPEND;
@@ -2948,7 +2962,7 @@ static int hda_codec_pm_suspend(struct device *dev)
29482962
static int hda_codec_pm_resume(struct device *dev)
29492963
{
29502964
dev->power.power_state = PMSG_RESUME;
2951-
return pm_runtime_force_resume(dev);
2965+
return hda_codec_force_resume(dev);
29522966
}
29532967

29542968
static int hda_codec_pm_freeze(struct device *dev)
@@ -2960,13 +2974,13 @@ static int hda_codec_pm_freeze(struct device *dev)
29602974
static int hda_codec_pm_thaw(struct device *dev)
29612975
{
29622976
dev->power.power_state = PMSG_THAW;
2963-
return pm_runtime_force_resume(dev);
2977+
return hda_codec_force_resume(dev);
29642978
}
29652979

29662980
static int hda_codec_pm_restore(struct device *dev)
29672981
{
29682982
dev->power.power_state = PMSG_RESTORE;
2969-
return pm_runtime_force_resume(dev);
2983+
return hda_codec_force_resume(dev);
29702984
}
29712985
#endif /* CONFIG_PM_SLEEP */
29722986

sound/pci/hda/hda_intel.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ static void __azx_runtime_suspend(struct azx *chip)
947947
display_power(chip, false);
948948
}
949949

950-
static void __azx_runtime_resume(struct azx *chip)
950+
static void __azx_runtime_resume(struct azx *chip, bool from_rt)
951951
{
952952
struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
953953
struct hdac_bus *bus = azx_bus(chip);
@@ -964,7 +964,7 @@ static void __azx_runtime_resume(struct azx *chip)
964964
azx_init_pci(chip);
965965
hda_intel_init_chip(chip, true);
966966

967-
if (status) {
967+
if (status && from_rt) {
968968
list_for_each_codec(codec, &chip->bus)
969969
if (status & (1 << codec->addr))
970970
schedule_delayed_work(&codec->jackpoll_work,
@@ -1016,7 +1016,7 @@ static int azx_resume(struct device *dev)
10161016
chip->msi = 0;
10171017
if (azx_acquire_irq(chip, 1) < 0)
10181018
return -EIO;
1019-
__azx_runtime_resume(chip);
1019+
__azx_runtime_resume(chip, false);
10201020
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
10211021

10221022
trace_azx_resume(chip);
@@ -1081,7 +1081,7 @@ static int azx_runtime_resume(struct device *dev)
10811081
chip = card->private_data;
10821082
if (!azx_has_pm_runtime(chip))
10831083
return 0;
1084-
__azx_runtime_resume(chip);
1084+
__azx_runtime_resume(chip, true);
10851085

10861086
/* disable controller Wake Up event*/
10871087
azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) &
@@ -2144,10 +2144,12 @@ static struct snd_pci_quirk power_save_blacklist[] = {
21442144
SND_PCI_QUIRK(0x8086, 0x2057, "Intel NUC5i7RYB", 0),
21452145
/* https://bugzilla.redhat.com/show_bug.cgi?id=1520902 */
21462146
SND_PCI_QUIRK(0x8086, 0x2068, "Intel NUC7i3BNB", 0),
2147-
/* https://bugzilla.redhat.com/show_bug.cgi?id=1572975 */
2148-
SND_PCI_QUIRK(0x17aa, 0x36a7, "Lenovo C50 All in one", 0),
21492147
/* https://bugzilla.kernel.org/show_bug.cgi?id=198611 */
21502148
SND_PCI_QUIRK(0x17aa, 0x2227, "Lenovo X1 Carbon 3rd Gen", 0),
2149+
/* https://bugzilla.redhat.com/show_bug.cgi?id=1689623 */
2150+
SND_PCI_QUIRK(0x17aa, 0x367b, "Lenovo IdeaCentre B550", 0),
2151+
/* https://bugzilla.redhat.com/show_bug.cgi?id=1572975 */
2152+
SND_PCI_QUIRK(0x17aa, 0x36a7, "Lenovo C50 All in one", 0),
21512153
{}
21522154
};
21532155
#endif /* CONFIG_PM */

sound/pci/hda/patch_realtek.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5687,6 +5687,7 @@ enum {
56875687
ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE,
56885688
ALC225_FIXUP_WYSE_AUTO_MUTE,
56895689
ALC225_FIXUP_WYSE_DISABLE_MIC_VREF,
5690+
ALC286_FIXUP_ACER_AIO_HEADSET_MIC,
56905691
};
56915692

56925693
static const struct hda_fixup alc269_fixups[] = {
@@ -6685,6 +6686,16 @@ static const struct hda_fixup alc269_fixups[] = {
66856686
.chained = true,
66866687
.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
66876688
},
6689+
[ALC286_FIXUP_ACER_AIO_HEADSET_MIC] = {
6690+
.type = HDA_FIXUP_VERBS,
6691+
.v.verbs = (const struct hda_verb[]) {
6692+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x4f },
6693+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x5029 },
6694+
{ }
6695+
},
6696+
.chained = true,
6697+
.chain_id = ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE
6698+
},
66886699
};
66896700

66906701
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -6701,9 +6712,9 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
67016712
SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS),
67026713
SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
67036714
SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK),
6704-
SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
6705-
SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
6706-
SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
6715+
SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
6716+
SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
6717+
SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
67076718
SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
67086719
SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
67096720
SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),

0 commit comments

Comments
 (0)