Skip to contentSkip to conversation

sound fixes

GIT PULL Takashi Iwai 1 participant 1 message Feb 20, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Linus,

please pull sound fixes for v2.6.38-rc6 from:

git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git for-linus

containing a few driver-specific small changes / quirks and a fairly minor security fix.

Thanks!

Takashi

===

David Henningsson (3):
ALSA: HDA: Add position_fix quirk for an Asus device
ALSA: HDA: Conexant auto: Handle multiple connections to ADC node
ALSA: HDA: Do not announce false surround in Conexant auto

Raymond Yau (1):
ALSA: au88x0 - Modify pointer callback to give accurate playback position

Takashi Iwai (1):
ALSA: caiaq - Fix possible string-buffer overflow

---
 sound/pci/au88x0/au88x0_core.c |   14 +++++++--
 sound/pci/hda/hda_intel.c      |    1 +
 sound/pci/hda/patch_conexant.c |   63 +++++++++++++++++++++++++++++++---------
 sound/usb/caiaq/audio.c        |    2 +-
 sound/usb/caiaq/midi.c         |    2 +-
 5 files changed, 63 insertions(+), 19 deletions(-)
sound/pci/au88x0/au88x0_core.c +11 -3
index 23f49f3..16c0bdf 100644
@@ -1252,11 +1252,19 @@ static void vortex_adbdma_resetup(vortex_t *vortex, int adbdma) {
 static int inline vortex_adbdma_getlinearpos(vortex_t * vortex, int adbdma)
 {
 	stream_t *dma = &vortex->dma_adb[adbdma];
-	int temp;
+	int temp, page, delta;
 
 	temp = hwread(vortex->mmio, VORTEX_ADBDMA_STAT + (adbdma << 2));
-	temp = (dma->period_virt * dma->period_bytes) + (temp & (dma->period_bytes - 1));
-	return temp;
+	page = (temp & ADB_SUBBUF_MASK) >> ADB_SUBBUF_SHIFT;
+	if (dma->nr_periods >= 4)
+		delta = (page - dma->period_real) & 3;
+	else {
+		delta = (page - dma->period_real);
+		if (delta < 0)
+			delta += dma->nr_periods;
+	}
+	return (dma->period_virt + delta) * dma->period_bytes
+		+ (temp & (dma->period_bytes - 1));
 }
 
 static void vortex_adbdma_startfifo(vortex_t * vortex, int adbdma)
sound/pci/hda/hda_intel.c +1 -0
index 0baffcd..fcedad9 100644
@@ -2308,6 +2308,7 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = {
 	SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB),
+	SND_PCI_QUIRK(0x1043, 0x8410, "ASUS", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x1179, 0xff10, "Toshiba A100-259", POS_FIX_LPIB),
sound/pci/hda/patch_conexant.c +49 -14

107 lines not on this page · raw message

sound/usb/caiaq/audio.c +1 -1
index 68b9747..66eabaf 100644
@@ -785,7 +785,7 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev)
 	}
 
 	dev->pcm->private_data = dev;
-	strcpy(dev->pcm->name, dev->product_name);
+	strlcpy(dev->pcm->name, dev->product_name, sizeof(dev->pcm->name));
 
 	memset(dev->sub_playback, 0, sizeof(dev->sub_playback));
 	memset(dev->sub_capture, 0, sizeof(dev->sub_capture));
sound/usb/caiaq/midi.c +1 -1
index 2f218c7..a1a4708 100644
@@ -136,7 +136,7 @@ int snd_usb_caiaq_midi_init(struct snd_usb_caiaqdev *device)
 	if (ret < 0)
 		return ret;
 
-	strcpy(rmidi->name, device->product_name);
+	strlcpy(rmidi->name, device->product_name, sizeof(rmidi->name));
 
 	rmidi->info_flags = SNDRV_RAWMIDI_INFO_DUPLEX;
 	rmidi->private_data = device;