Skip to content

Commit ca83a55

Browse files
committed
Merge tag 'sound-4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Again pretty calm weeks: we've had only a few trivial / stable HD-audio fixes in addition to a possible race fix for snd-dummy driver spotted by syzkaller" * tag 'sound-4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: dummy: Fix a use-after-free at closing ALSA: hda / realtek - add two more Thinkpad IDs (5050,5053) for tpt460 fixup ALSA: hda - Fix the headset mic jack detection on Dell machine ALSA: hda/tegra: iomem fixups for sparse warnings ALSA: hdac_regmap - fix the register access for runtime PM
2 parents 9a949a9 + d5dbbe6 commit ca83a55

4 files changed

Lines changed: 19 additions & 12 deletions

File tree

sound/drivers/dummy.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ static int dummy_hrtimer_stop(struct snd_pcm_substream *substream)
420420

421421
static inline void dummy_hrtimer_sync(struct dummy_hrtimer_pcm *dpcm)
422422
{
423+
hrtimer_cancel(&dpcm->timer);
423424
tasklet_kill(&dpcm->tasklet);
424425
}
425426

sound/hda/hdac_regmap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ int snd_hdac_regmap_write_raw(struct hdac_device *codec, unsigned int reg,
444444
err = reg_raw_write(codec, reg, val);
445445
if (err == -EAGAIN) {
446446
err = snd_hdac_power_up_pm(codec);
447-
if (!err)
447+
if (err >= 0)
448448
err = reg_raw_write(codec, reg, val);
449449
snd_hdac_power_down_pm(codec);
450450
}
@@ -470,7 +470,7 @@ static int __snd_hdac_regmap_read_raw(struct hdac_device *codec,
470470
err = reg_raw_read(codec, reg, val, uncached);
471471
if (err == -EAGAIN) {
472472
err = snd_hdac_power_up_pm(codec);
473-
if (!err)
473+
if (err >= 0)
474474
err = reg_raw_read(codec, reg, val, uncached);
475475
snd_hdac_power_down_pm(codec);
476476
}

sound/pci/hda/hda_tegra.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,20 @@ static int substream_free_pages(struct azx *chip,
115115
/*
116116
* Register access ops. Tegra HDA register access is DWORD only.
117117
*/
118-
static void hda_tegra_writel(u32 value, u32 *addr)
118+
static void hda_tegra_writel(u32 value, u32 __iomem *addr)
119119
{
120120
writel(value, addr);
121121
}
122122

123-
static u32 hda_tegra_readl(u32 *addr)
123+
static u32 hda_tegra_readl(u32 __iomem *addr)
124124
{
125125
return readl(addr);
126126
}
127127

128-
static void hda_tegra_writew(u16 value, u16 *addr)
128+
static void hda_tegra_writew(u16 value, u16 __iomem *addr)
129129
{
130130
unsigned int shift = ((unsigned long)(addr) & 0x3) << 3;
131-
void *dword_addr = (void *)((unsigned long)(addr) & ~0x3);
131+
void __iomem *dword_addr = (void __iomem *)((unsigned long)(addr) & ~0x3);
132132
u32 v;
133133

134134
v = readl(dword_addr);
@@ -137,20 +137,20 @@ static void hda_tegra_writew(u16 value, u16 *addr)
137137
writel(v, dword_addr);
138138
}
139139

140-
static u16 hda_tegra_readw(u16 *addr)
140+
static u16 hda_tegra_readw(u16 __iomem *addr)
141141
{
142142
unsigned int shift = ((unsigned long)(addr) & 0x3) << 3;
143-
void *dword_addr = (void *)((unsigned long)(addr) & ~0x3);
143+
void __iomem *dword_addr = (void __iomem *)((unsigned long)(addr) & ~0x3);
144144
u32 v;
145145

146146
v = readl(dword_addr);
147147
return (v >> shift) & 0xffff;
148148
}
149149

150-
static void hda_tegra_writeb(u8 value, u8 *addr)
150+
static void hda_tegra_writeb(u8 value, u8 __iomem *addr)
151151
{
152152
unsigned int shift = ((unsigned long)(addr) & 0x3) << 3;
153-
void *dword_addr = (void *)((unsigned long)(addr) & ~0x3);
153+
void __iomem *dword_addr = (void __iomem *)((unsigned long)(addr) & ~0x3);
154154
u32 v;
155155

156156
v = readl(dword_addr);
@@ -159,10 +159,10 @@ static void hda_tegra_writeb(u8 value, u8 *addr)
159159
writel(v, dword_addr);
160160
}
161161

162-
static u8 hda_tegra_readb(u8 *addr)
162+
static u8 hda_tegra_readb(u8 __iomem *addr)
163163
{
164164
unsigned int shift = ((unsigned long)(addr) & 0x3) << 3;
165-
void *dword_addr = (void *)((unsigned long)(addr) & ~0x3);
165+
void __iomem *dword_addr = (void __iomem *)((unsigned long)(addr) & ~0x3);
166166
u32 v;
167167

168168
v = readl(dword_addr);

sound/pci/hda/patch_realtek.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5650,6 +5650,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
56505650
SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK),
56515651
SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK),
56525652
SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE),
5653+
SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460),
5654+
SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460),
56535655
SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
56545656
SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
56555657
SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
@@ -5831,6 +5833,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
58315833
{0x12, 0x90a60160},
58325834
{0x14, 0x90170120},
58335835
{0x21, 0x02211030}),
5836+
SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
5837+
{0x12, 0x90a60170},
5838+
{0x14, 0x90170120},
5839+
{0x21, 0x02211030}),
58345840
SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
58355841
ALC256_STANDARD_PINS),
58365842
SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,

0 commit comments

Comments
 (0)