Skip to contentSkip to conversation

sound fixes for 3.1-rc1

GIT PULL Takashi Iwai 1 participant 1 message Aug 2, 2011

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

Linus,

please pull yet another sound fixes for v3.1-rc1 from:

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

This contains only small fixes (some for regressions), and a few snd-hdspm driver updates, which are local and safe to apply.

Thanks!

Takashi

===

Adrian Knoth (3):
ALSA: hdspm - Provide MADI speed mode selector on RME MADI and MADIface
ALSA: hdspm - Fix reported external sample rate on RME MADI and MADIface
ALSA: hdspm - Add firmware revision 0xcc for RME MADI

Eliot Blennerhassett (1):
ALSA: asihpi - Clarify adapter index validity check

Jesper Juhl (1):
ALSA: asihpi - Don't leak firmware if mem alloc fails

Julia Lawall (1):
ALSA: sound/core/pcm_compat.c: adjust array index

Ralf Baechle (1):
ASoC: Fix txx9aclc.c build

Randy Dunlap (1):
ALSA: rtctimer.c needs module.h

---
 sound/core/pcm_compat.c     |    2 +-
 sound/core/rtctimer.c       |    2 +-
 sound/pci/asihpi/hpidspcd.c |    9 ++-
 sound/pci/asihpi/hpioctl.c  |   19 +++++---
 sound/pci/rme9652/hdspm.c   |  109 ++++++++++++++++++++++++++++++++++++++++++-
 sound/soc/txx9/txx9aclc.c   |    1 +
 6 files changed, 128 insertions(+), 14 deletions(-)
sound/core/pcm_compat.c +1 -1
index 5fb2e28..91cdf94 100644
@@ -342,7 +342,7 @@ static int snd_pcm_ioctl_xfern_compat(struct snd_pcm_substream *substream,
 			kfree(bufs);
 			return -EFAULT;
 		}
-		bufs[ch] = compat_ptr(ptr);
+		bufs[i] = compat_ptr(ptr);
 		bufptr++;
 	}
 	if (dir == SNDRV_PCM_STREAM_PLAYBACK)
sound/core/rtctimer.c +1 -1
index 0851cd1..e85e72b 100644
@@ -22,7 +22,7 @@
 
 #include <linux/init.h>
 #include <linux/interrupt.h>
-#include <linux/moduleparam.h>
+#include <linux/module.h>
 #include <linux/log2.h>
 #include <sound/core.h>
 #include <sound/timer.h>
sound/pci/asihpi/hpidspcd.c +6 -3
index 3a7afa3..71d32c8 100644
@@ -43,6 +43,7 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
 	struct pci_dev *dev = os_data;
 	struct code_header header;
 	char fw_name[20];
+	short err_ret = HPI_ERROR_DSP_FILE_NOT_FOUND;
 	int err;
 
 	sprintf(fw_name, "asihpi/dsp%04x.bin", adapter);
@@ -85,8 +86,10 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
 
 	HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name);
 	dsp_code->pvt = kmalloc(sizeof(*dsp_code->pvt), GFP_KERNEL);
-	if (!dsp_code->pvt)
-		return HPI_ERROR_MEMORY_ALLOC;
+	if (!dsp_code->pvt) {
+		err_ret = HPI_ERROR_MEMORY_ALLOC;
+		goto error2;
+	}
 
 	dsp_code->pvt->dev = dev;
 	dsp_code->pvt->firmware = firmware;
@@ -99,7 +102,7 @@ error2:
 	release_firmware(firmware);
 error1:
 	dsp_code->block_length = 0;
-	return HPI_ERROR_DSP_FILE_NOT_FOUND;
+	return err_ret;
 }
 
 /*-------------------------------------------------------------------*/
sound/pci/asihpi/hpioctl.c +12 -7
index 9683f84..a32502e 100644
@@ -177,16 +177,21 @@ long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	} else {
 		u16 __user *ptr = NULL;
 		u32 size = 0;
-
+		u32 adapter_present;
 		/* -1=no data 0=read from user mem, 1=write to user mem */
 		int wrflag = -1;
-		u32 adapter = hm->h.adapter_index;
-		struct hpi_adapter *pa = &adapters[adapter];
+		struct hpi_adapter *pa;
+
+		if (hm->h.adapter_index < HPI_MAX_ADAPTERS) {
+			pa = &adapters[hm->h.adapter_index];
+			adapter_present = pa->type;
+		} else {
+			adapter_present = 0;
+		}
 
-		if ((adapter >= HPI_MAX_ADAPTERS) || (!pa->type)) {
-			hpi_init_response(&hr->r0, HPI_OBJ_ADAPTER,
-				HPI_ADAPTER_OPEN,
-				HPI_ERROR_BAD_ADAPTER_NUMBER);
+		if (!adapter_present) {
+			hpi_init_response(&hr->r0, hm->h.object,
+				hm->h.function, HPI_ERROR_BAD_ADAPTER_NUMBER);
 
 			uncopied_bytes =
 				copy_to_user(puhr, hr, sizeof(hr->h));
sound/pci/rme9652/hdspm.c +107 -2

145 lines not on this page · raw message

sound/soc/txx9/txx9aclc.c +1 -0
index 34aa972..3de99af 100644
@@ -290,6 +290,7 @@ static void txx9aclc_pcm_free_dma_buffers(struct snd_pcm *pcm)
 
 static int txx9aclc_pcm_new(struct snd_soc_pcm_runtime *rtd)
 {
+	struct snd_card *card = rtd->card->snd_card;
 	struct snd_soc_dai *dai = rtd->cpu_dai;
 	struct snd_pcm *pcm = rtd->pcm;
 	struct platform_device *pdev = to_platform_device(dai->platform->dev);