aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/core/compress_offload.c2
-rw-r--r--sound/pci/hda/hda_auto_parser.c2
-rw-r--r--sound/pci/hda/patch_sigmatel.c1
-rw-r--r--sound/soc/au1x/ac97c.c2
-rw-r--r--sound/soc/blackfin/bf5xx-ac97.c5
-rw-r--r--sound/soc/blackfin/bf5xx-ac97.h1
-rw-r--r--sound/soc/codecs/wm0010.c24
-rw-r--r--sound/soc/soc-dapm.c5
-rw-r--r--sound/usb/6fire/comm.c38
-rw-r--r--sound/usb/6fire/comm.h2
-rw-r--r--sound/usb/endpoint.c13
11 files changed, 61 insertions, 34 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 99db892d7299..98969541cbcc 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -743,7 +743,7 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
743 mutex_lock(&stream->device->lock); 743 mutex_lock(&stream->device->lock);
744 switch (_IOC_NR(cmd)) { 744 switch (_IOC_NR(cmd)) {
745 case _IOC_NR(SNDRV_COMPRESS_IOCTL_VERSION): 745 case _IOC_NR(SNDRV_COMPRESS_IOCTL_VERSION):
746 put_user(SNDRV_COMPRESS_VERSION, 746 retval = put_user(SNDRV_COMPRESS_VERSION,
747 (int __user *)arg) ? -EFAULT : 0; 747 (int __user *)arg) ? -EFAULT : 0;
748 break; 748 break;
749 case _IOC_NR(SNDRV_COMPRESS_GET_CAPS): 749 case _IOC_NR(SNDRV_COMPRESS_GET_CAPS):
diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c
index 7c11d46b84d3..48a9d004d6d9 100644
--- a/sound/pci/hda/hda_auto_parser.c
+++ b/sound/pci/hda/hda_auto_parser.c
@@ -860,7 +860,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
860 } 860 }
861 } 861 }
862 if (id < 0 && quirk) { 862 if (id < 0 && quirk) {
863 for (q = quirk; q->subvendor; q++) { 863 for (q = quirk; q->subvendor || q->subdevice; q++) {
864 unsigned int vendorid = 864 unsigned int vendorid =
865 q->subdevice | (q->subvendor << 16); 865 q->subdevice | (q->subvendor << 16);
866 unsigned int mask = 0xffff0000 | q->subdevice_mask; 866 unsigned int mask = 0xffff0000 | q->subdevice_mask;
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 92b9b4324372..6d1924c19abf 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -2819,6 +2819,7 @@ static const struct hda_pintbl ecs202_pin_configs[] = {
2819 2819
2820/* codec SSIDs for Intel Mac sharing the same PCI SSID 8384:7680 */ 2820/* codec SSIDs for Intel Mac sharing the same PCI SSID 8384:7680 */
2821static const struct snd_pci_quirk stac922x_intel_mac_fixup_tbl[] = { 2821static const struct snd_pci_quirk stac922x_intel_mac_fixup_tbl[] = {
2822 SND_PCI_QUIRK(0x0000, 0x0100, "Mac Mini", STAC_INTEL_MAC_V3),
2822 SND_PCI_QUIRK(0x106b, 0x0800, "Mac", STAC_INTEL_MAC_V1), 2823 SND_PCI_QUIRK(0x106b, 0x0800, "Mac", STAC_INTEL_MAC_V1),
2823 SND_PCI_QUIRK(0x106b, 0x0600, "Mac", STAC_INTEL_MAC_V2), 2824 SND_PCI_QUIRK(0x106b, 0x0600, "Mac", STAC_INTEL_MAC_V2),
2824 SND_PCI_QUIRK(0x106b, 0x0700, "Mac", STAC_INTEL_MAC_V2), 2825 SND_PCI_QUIRK(0x106b, 0x0700, "Mac", STAC_INTEL_MAC_V2),
diff --git a/sound/soc/au1x/ac97c.c b/sound/soc/au1x/ac97c.c
index d6f7694fcad4..c8a2de103c5f 100644
--- a/sound/soc/au1x/ac97c.c
+++ b/sound/soc/au1x/ac97c.c
@@ -341,7 +341,7 @@ static struct platform_driver au1xac97c_driver = {
341 .remove = au1xac97c_drvremove, 341 .remove = au1xac97c_drvremove,
342}; 342};
343 343
344module_platform_driver(&au1xac97c_driver); 344module_platform_driver(au1xac97c_driver);
345 345
346MODULE_LICENSE("GPL"); 346MODULE_LICENSE("GPL");
347MODULE_DESCRIPTION("Au1000/1500/1100 AC97C ASoC driver"); 347MODULE_DESCRIPTION("Au1000/1500/1100 AC97C ASoC driver");
diff --git a/sound/soc/blackfin/bf5xx-ac97.c b/sound/soc/blackfin/bf5xx-ac97.c
index efb1daecd0dd..e82eb373a731 100644
--- a/sound/soc/blackfin/bf5xx-ac97.c
+++ b/sound/soc/blackfin/bf5xx-ac97.c
@@ -294,11 +294,12 @@ static int asoc_bfin_ac97_probe(struct platform_device *pdev)
294 /* Request PB3 as reset pin */ 294 /* Request PB3 as reset pin */
295 ret = devm_gpio_request_one(&pdev->dev, 295 ret = devm_gpio_request_one(&pdev->dev,
296 CONFIG_SND_BF5XX_RESET_GPIO_NUM, 296 CONFIG_SND_BF5XX_RESET_GPIO_NUM,
297 GPIOF_OUT_INIT_HIGH, "SND_AD198x RESET") { 297 GPIOF_OUT_INIT_HIGH, "SND_AD198x RESET");
298 if (ret) {
298 dev_err(&pdev->dev, 299 dev_err(&pdev->dev,
299 "Failed to request GPIO_%d for reset: %d\n", 300 "Failed to request GPIO_%d for reset: %d\n",
300 CONFIG_SND_BF5XX_RESET_GPIO_NUM, ret); 301 CONFIG_SND_BF5XX_RESET_GPIO_NUM, ret);
301 goto gpio_err; 302 return ret;
302 } 303 }
303#endif 304#endif
304 305
diff --git a/sound/soc/blackfin/bf5xx-ac97.h b/sound/soc/blackfin/bf5xx-ac97.h
index 15c635e33f4d..0c3e22d90a8d 100644
--- a/sound/soc/blackfin/bf5xx-ac97.h
+++ b/sound/soc/blackfin/bf5xx-ac97.h
@@ -9,7 +9,6 @@
9#ifndef _BF5XX_AC97_H 9#ifndef _BF5XX_AC97_H
10#define _BF5XX_AC97_H 10#define _BF5XX_AC97_H
11 11
12extern struct snd_ac97_bus_ops bf5xx_ac97_ops;
13extern struct snd_ac97 *ac97; 12extern struct snd_ac97 *ac97;
14/* Frame format in memory, only support stereo currently */ 13/* Frame format in memory, only support stereo currently */
15struct ac97_frame { 14struct ac97_frame {
diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c
index f5e835662cdc..10adc4145d46 100644
--- a/sound/soc/codecs/wm0010.c
+++ b/sound/soc/codecs/wm0010.c
@@ -410,6 +410,16 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec)
410 rec->command, rec->length); 410 rec->command, rec->length);
411 len = rec->length + 8; 411 len = rec->length + 8;
412 412
413 xfer = kzalloc(sizeof(*xfer), GFP_KERNEL);
414 if (!xfer) {
415 dev_err(codec->dev, "Failed to allocate xfer\n");
416 ret = -ENOMEM;
417 goto abort;
418 }
419
420 xfer->codec = codec;
421 list_add_tail(&xfer->list, &xfer_list);
422
413 out = kzalloc(len, GFP_KERNEL); 423 out = kzalloc(len, GFP_KERNEL);
414 if (!out) { 424 if (!out) {
415 dev_err(codec->dev, 425 dev_err(codec->dev,
@@ -417,6 +427,7 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec)
417 ret = -ENOMEM; 427 ret = -ENOMEM;
418 goto abort1; 428 goto abort1;
419 } 429 }
430 xfer->t.rx_buf = out;
420 431
421 img = kzalloc(len, GFP_KERNEL); 432 img = kzalloc(len, GFP_KERNEL);
422 if (!img) { 433 if (!img) {
@@ -425,24 +436,13 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec)
425 ret = -ENOMEM; 436 ret = -ENOMEM;
426 goto abort1; 437 goto abort1;
427 } 438 }
439 xfer->t.tx_buf = img;
428 440
429 byte_swap_64((u64 *)&rec->command, img, len); 441 byte_swap_64((u64 *)&rec->command, img, len);
430 442
431 xfer = kzalloc(sizeof(*xfer), GFP_KERNEL);
432 if (!xfer) {
433 dev_err(codec->dev, "Failed to allocate xfer\n");
434 ret = -ENOMEM;
435 goto abort1;
436 }
437
438 xfer->codec = codec;
439 list_add_tail(&xfer->list, &xfer_list);
440
441 spi_message_init(&xfer->m); 443 spi_message_init(&xfer->m);
442 xfer->m.complete = wm0010_boot_xfer_complete; 444 xfer->m.complete = wm0010_boot_xfer_complete;
443 xfer->m.context = xfer; 445 xfer->m.context = xfer;
444 xfer->t.tx_buf = img;
445 xfer->t.rx_buf = out;
446 xfer->t.len = len; 446 xfer->t.len = len;
447 xfer->t.bits_per_word = 8; 447 xfer->t.bits_per_word = 8;
448 448
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index b94190820e8c..bd16010441cc 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2733,7 +2733,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
2733 } 2733 }
2734 2734
2735 mutex_unlock(&card->dapm_mutex); 2735 mutex_unlock(&card->dapm_mutex);
2736 return 0; 2736 return change;
2737} 2737}
2738EXPORT_SYMBOL_GPL(snd_soc_dapm_put_volsw); 2738EXPORT_SYMBOL_GPL(snd_soc_dapm_put_volsw);
2739 2739
@@ -2861,7 +2861,6 @@ int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol,
2861 struct soc_enum *e = 2861 struct soc_enum *e =
2862 (struct soc_enum *)kcontrol->private_value; 2862 (struct soc_enum *)kcontrol->private_value;
2863 int change; 2863 int change;
2864 int ret = 0;
2865 int wi; 2864 int wi;
2866 2865
2867 if (ucontrol->value.enumerated.item[0] >= e->max) 2866 if (ucontrol->value.enumerated.item[0] >= e->max)
@@ -2881,7 +2880,7 @@ int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol,
2881 } 2880 }
2882 2881
2883 mutex_unlock(&card->dapm_mutex); 2882 mutex_unlock(&card->dapm_mutex);
2884 return ret; 2883 return change;
2885} 2884}
2886EXPORT_SYMBOL_GPL(snd_soc_dapm_put_enum_virt); 2885EXPORT_SYMBOL_GPL(snd_soc_dapm_put_enum_virt);
2887 2886
diff --git a/sound/usb/6fire/comm.c b/sound/usb/6fire/comm.c
index 9e6e3ffd86bb..23452ee617e1 100644
--- a/sound/usb/6fire/comm.c
+++ b/sound/usb/6fire/comm.c
@@ -110,19 +110,37 @@ static int usb6fire_comm_send_buffer(u8 *buffer, struct usb_device *dev)
110static int usb6fire_comm_write8(struct comm_runtime *rt, u8 request, 110static int usb6fire_comm_write8(struct comm_runtime *rt, u8 request,
111 u8 reg, u8 value) 111 u8 reg, u8 value)
112{ 112{
113 u8 buffer[13]; /* 13: maximum length of message */ 113 u8 *buffer;
114 int ret;
115
116 /* 13: maximum length of message */
117 buffer = kmalloc(13, GFP_KERNEL);
118 if (!buffer)
119 return -ENOMEM;
114 120
115 usb6fire_comm_init_buffer(buffer, 0x00, request, reg, value, 0x00); 121 usb6fire_comm_init_buffer(buffer, 0x00, request, reg, value, 0x00);
116 return usb6fire_comm_send_buffer(buffer, rt->chip->dev); 122 ret = usb6fire_comm_send_buffer(buffer, rt->chip->dev);
123
124 kfree(buffer);
125 return ret;
117} 126}
118 127
119static int usb6fire_comm_write16(struct comm_runtime *rt, u8 request, 128static int usb6fire_comm_write16(struct comm_runtime *rt, u8 request,
120 u8 reg, u8 vl, u8 vh) 129 u8 reg, u8 vl, u8 vh)
121{ 130{
122 u8 buffer[13]; /* 13: maximum length of message */ 131 u8 *buffer;
132 int ret;
133
134 /* 13: maximum length of message */
135 buffer = kmalloc(13, GFP_KERNEL);
136 if (!buffer)
137 return -ENOMEM;
123 138
124 usb6fire_comm_init_buffer(buffer, 0x00, request, reg, vl, vh); 139 usb6fire_comm_init_buffer(buffer, 0x00, request, reg, vl, vh);
125 return usb6fire_comm_send_buffer(buffer, rt->chip->dev); 140 ret = usb6fire_comm_send_buffer(buffer, rt->chip->dev);
141
142 kfree(buffer);
143 return ret;
126} 144}
127 145
128int usb6fire_comm_init(struct sfire_chip *chip) 146int usb6fire_comm_init(struct sfire_chip *chip)
@@ -135,6 +153,12 @@ int usb6fire_comm_init(struct sfire_chip *chip)
135 if (!rt) 153 if (!rt)
136 return -ENOMEM; 154 return -ENOMEM;
137 155
156 rt->receiver_buffer = kzalloc(COMM_RECEIVER_BUFSIZE, GFP_KERNEL);
157 if (!rt->receiver_buffer) {
158 kfree(rt);
159 return -ENOMEM;
160 }
161
138 urb = &rt->receiver; 162 urb = &rt->receiver;
139 rt->serial = 1; 163 rt->serial = 1;
140 rt->chip = chip; 164 rt->chip = chip;
@@ -153,6 +177,7 @@ int usb6fire_comm_init(struct sfire_chip *chip)
153 urb->interval = 1; 177 urb->interval = 1;
154 ret = usb_submit_urb(urb, GFP_KERNEL); 178 ret = usb_submit_urb(urb, GFP_KERNEL);
155 if (ret < 0) { 179 if (ret < 0) {
180 kfree(rt->receiver_buffer);
156 kfree(rt); 181 kfree(rt);
157 snd_printk(KERN_ERR PREFIX "cannot create comm data receiver."); 182 snd_printk(KERN_ERR PREFIX "cannot create comm data receiver.");
158 return ret; 183 return ret;
@@ -171,6 +196,9 @@ void usb6fire_comm_abort(struct sfire_chip *chip)
171 196
172void usb6fire_comm_destroy(struct sfire_chip *chip) 197void usb6fire_comm_destroy(struct sfire_chip *chip)
173{ 198{
174 kfree(chip->comm); 199 struct comm_runtime *rt = chip->comm;
200
201 kfree(rt->receiver_buffer);
202 kfree(rt);
175 chip->comm = NULL; 203 chip->comm = NULL;
176} 204}
diff --git a/sound/usb/6fire/comm.h b/sound/usb/6fire/comm.h
index 6a0840b0dcff..780d5ed8e5d8 100644
--- a/sound/usb/6fire/comm.h
+++ b/sound/usb/6fire/comm.h
@@ -24,7 +24,7 @@ struct comm_runtime {
24 struct sfire_chip *chip; 24 struct sfire_chip *chip;
25 25
26 struct urb receiver; 26 struct urb receiver;
27 u8 receiver_buffer[COMM_RECEIVER_BUFSIZE]; 27 u8 *receiver_buffer;
28 28
29 u8 serial; /* urb serial */ 29 u8 serial; /* urb serial */
30 30
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 7a444b5501d9..659950e5b94f 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -591,17 +591,16 @@ static int data_ep_set_params(struct snd_usb_endpoint *ep,
591 ep->stride = frame_bits >> 3; 591 ep->stride = frame_bits >> 3;
592 ep->silence_value = pcm_format == SNDRV_PCM_FORMAT_U8 ? 0x80 : 0; 592 ep->silence_value = pcm_format == SNDRV_PCM_FORMAT_U8 ? 0x80 : 0;
593 593
594 /* calculate max. frequency */ 594 /* assume max. frequency is 25% higher than nominal */
595 if (ep->maxpacksize) { 595 ep->freqmax = ep->freqn + (ep->freqn >> 2);
596 maxsize = ((ep->freqmax + 0xffff) * (frame_bits >> 3))
597 >> (16 - ep->datainterval);
598 /* but wMaxPacketSize might reduce this */
599 if (ep->maxpacksize && ep->maxpacksize < maxsize) {
596 /* whatever fits into a max. size packet */ 600 /* whatever fits into a max. size packet */
597 maxsize = ep->maxpacksize; 601 maxsize = ep->maxpacksize;
598 ep->freqmax = (maxsize / (frame_bits >> 3)) 602 ep->freqmax = (maxsize / (frame_bits >> 3))
599 << (16 - ep->datainterval); 603 << (16 - ep->datainterval);
600 } else {
601 /* no max. packet size: just take 25% higher than nominal */
602 ep->freqmax = ep->freqn + (ep->freqn >> 2);
603 maxsize = ((ep->freqmax + 0xffff) * (frame_bits >> 3))
604 >> (16 - ep->datainterval);
605 } 604 }
606 605
607 if (ep->fill_max) 606 if (ep->fill_max)