diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-08-16 11:40:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-08-16 11:40:23 -0400 |
commit | d3ec3a1fd08f705d1b319db4113590944bcde749 (patch) | |
tree | 598a0da59e027b455f11beab24a96ef1e56fbbcb /sound | |
parent | 8f898fbbe5ee5e20a77c4074472a1fd088dc47d1 (diff) | |
parent | d4e4ab86bcba5a72779c43dc1459f71fea3d89c8 (diff) |
Merge tag 'v3.11-rc5' into sched/core
Merge Linux 3.11-rc5, to pick up the latest fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/compress_offload.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_auto_parser.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 14 | ||||
-rw-r--r-- | sound/soc/au1x/ac97c.c | 2 | ||||
-rw-r--r-- | sound/soc/blackfin/bf5xx-ac97.c | 5 | ||||
-rw-r--r-- | sound/soc/blackfin/bf5xx-ac97.h | 1 | ||||
-rw-r--r-- | sound/soc/cirrus/ep93xx-ac97.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/max98088.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/wm0010.c | 24 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 4 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 5 | ||||
-rw-r--r-- | sound/soc/tegra/tegra20_ac97.c | 6 | ||||
-rw-r--r-- | sound/soc/tegra/tegra20_spdif.c | 4 | ||||
-rw-r--r-- | sound/usb/6fire/comm.c | 38 | ||||
-rw-r--r-- | sound/usb/6fire/comm.h | 2 | ||||
-rw-r--r-- | sound/usb/6fire/pcm.c | 2 | ||||
-rw-r--r-- | sound/usb/endpoint.c | 13 | ||||
-rw-r--r-- | sound/usb/hiface/pcm.c | 2 |
19 files changed, 82 insertions, 53 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 e2f83591161b..6d1924c19abf 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -417,9 +417,11 @@ static void stac_update_outputs(struct hda_codec *codec) | |||
417 | val &= ~spec->eapd_mask; | 417 | val &= ~spec->eapd_mask; |
418 | else | 418 | else |
419 | val |= spec->eapd_mask; | 419 | val |= spec->eapd_mask; |
420 | if (spec->gpio_data != val) | 420 | if (spec->gpio_data != val) { |
421 | spec->gpio_data = val; | ||
421 | stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, | 422 | stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, |
422 | val); | 423 | val); |
424 | } | ||
423 | } | 425 | } |
424 | } | 426 | } |
425 | 427 | ||
@@ -2817,6 +2819,7 @@ static const struct hda_pintbl ecs202_pin_configs[] = { | |||
2817 | 2819 | ||
2818 | /* 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 */ |
2819 | static const struct snd_pci_quirk stac922x_intel_mac_fixup_tbl[] = { | 2821 | static const struct snd_pci_quirk stac922x_intel_mac_fixup_tbl[] = { |
2822 | SND_PCI_QUIRK(0x0000, 0x0100, "Mac Mini", STAC_INTEL_MAC_V3), | ||
2820 | SND_PCI_QUIRK(0x106b, 0x0800, "Mac", STAC_INTEL_MAC_V1), | 2823 | SND_PCI_QUIRK(0x106b, 0x0800, "Mac", STAC_INTEL_MAC_V1), |
2821 | SND_PCI_QUIRK(0x106b, 0x0600, "Mac", STAC_INTEL_MAC_V2), | 2824 | SND_PCI_QUIRK(0x106b, 0x0600, "Mac", STAC_INTEL_MAC_V2), |
2822 | SND_PCI_QUIRK(0x106b, 0x0700, "Mac", STAC_INTEL_MAC_V2), | 2825 | SND_PCI_QUIRK(0x106b, 0x0700, "Mac", STAC_INTEL_MAC_V2), |
@@ -3231,7 +3234,7 @@ static const struct hda_fixup stac927x_fixups[] = { | |||
3231 | /* configure the analog microphone on some laptops */ | 3234 | /* configure the analog microphone on some laptops */ |
3232 | { 0x0c, 0x90a79130 }, | 3235 | { 0x0c, 0x90a79130 }, |
3233 | /* correct the front output jack as a hp out */ | 3236 | /* correct the front output jack as a hp out */ |
3234 | { 0x0f, 0x0227011f }, | 3237 | { 0x0f, 0x0221101f }, |
3235 | /* correct the front input jack as a mic */ | 3238 | /* correct the front input jack as a mic */ |
3236 | { 0x0e, 0x02a79130 }, | 3239 | { 0x0e, 0x02a79130 }, |
3237 | {} | 3240 | {} |
@@ -3612,20 +3615,18 @@ static int stac_parse_auto_config(struct hda_codec *codec) | |||
3612 | static int stac_init(struct hda_codec *codec) | 3615 | static int stac_init(struct hda_codec *codec) |
3613 | { | 3616 | { |
3614 | struct sigmatel_spec *spec = codec->spec; | 3617 | struct sigmatel_spec *spec = codec->spec; |
3615 | unsigned int gpio; | ||
3616 | int i; | 3618 | int i; |
3617 | 3619 | ||
3618 | /* override some hints */ | 3620 | /* override some hints */ |
3619 | stac_store_hints(codec); | 3621 | stac_store_hints(codec); |
3620 | 3622 | ||
3621 | /* set up GPIO */ | 3623 | /* set up GPIO */ |
3622 | gpio = spec->gpio_data; | ||
3623 | /* turn on EAPD statically when spec->eapd_switch isn't set. | 3624 | /* turn on EAPD statically when spec->eapd_switch isn't set. |
3624 | * otherwise, unsol event will turn it on/off dynamically | 3625 | * otherwise, unsol event will turn it on/off dynamically |
3625 | */ | 3626 | */ |
3626 | if (!spec->eapd_switch) | 3627 | if (!spec->eapd_switch) |
3627 | gpio |= spec->eapd_mask; | 3628 | spec->gpio_data |= spec->eapd_mask; |
3628 | stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, gpio); | 3629 | stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, spec->gpio_data); |
3629 | 3630 | ||
3630 | snd_hda_gen_init(codec); | 3631 | snd_hda_gen_init(codec); |
3631 | 3632 | ||
@@ -3915,6 +3916,7 @@ static void stac_setup_gpio(struct hda_codec *codec) | |||
3915 | { | 3916 | { |
3916 | struct sigmatel_spec *spec = codec->spec; | 3917 | struct sigmatel_spec *spec = codec->spec; |
3917 | 3918 | ||
3919 | spec->gpio_mask |= spec->eapd_mask; | ||
3918 | if (spec->gpio_led) { | 3920 | if (spec->gpio_led) { |
3919 | if (!spec->vref_mute_led_nid) { | 3921 | if (!spec->vref_mute_led_nid) { |
3920 | spec->gpio_mask |= spec->gpio_led; | 3922 | spec->gpio_mask |= spec->gpio_led; |
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 | ||
344 | module_platform_driver(&au1xac97c_driver); | 344 | module_platform_driver(au1xac97c_driver); |
345 | 345 | ||
346 | MODULE_LICENSE("GPL"); | 346 | MODULE_LICENSE("GPL"); |
347 | MODULE_DESCRIPTION("Au1000/1500/1100 AC97C ASoC driver"); | 347 | MODULE_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 | ||
12 | extern struct snd_ac97_bus_ops bf5xx_ac97_ops; | ||
13 | extern struct snd_ac97 *ac97; | 12 | extern struct snd_ac97 *ac97; |
14 | /* Frame format in memory, only support stereo currently */ | 13 | /* Frame format in memory, only support stereo currently */ |
15 | struct ac97_frame { | 14 | struct ac97_frame { |
diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c index ac73c607410a..04491f0e8d1b 100644 --- a/sound/soc/cirrus/ep93xx-ac97.c +++ b/sound/soc/cirrus/ep93xx-ac97.c | |||
@@ -102,13 +102,13 @@ static struct ep93xx_ac97_info *ep93xx_ac97_info; | |||
102 | 102 | ||
103 | static struct ep93xx_dma_data ep93xx_ac97_pcm_out = { | 103 | static struct ep93xx_dma_data ep93xx_ac97_pcm_out = { |
104 | .name = "ac97-pcm-out", | 104 | .name = "ac97-pcm-out", |
105 | .dma_port = EP93XX_DMA_AAC1, | 105 | .port = EP93XX_DMA_AAC1, |
106 | .direction = DMA_MEM_TO_DEV, | 106 | .direction = DMA_MEM_TO_DEV, |
107 | }; | 107 | }; |
108 | 108 | ||
109 | static struct ep93xx_dma_data ep93xx_ac97_pcm_in = { | 109 | static struct ep93xx_dma_data ep93xx_ac97_pcm_in = { |
110 | .name = "ac97-pcm-in", | 110 | .name = "ac97-pcm-in", |
111 | .dma_port = EP93XX_DMA_AAC1, | 111 | .port = EP93XX_DMA_AAC1, |
112 | .direction = DMA_DEV_TO_MEM, | 112 | .direction = DMA_DEV_TO_MEM, |
113 | }; | 113 | }; |
114 | 114 | ||
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index 3eeada57e87d..566a367c94fa 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c | |||
@@ -1612,7 +1612,7 @@ static int max98088_dai2_digital_mute(struct snd_soc_dai *codec_dai, int mute) | |||
1612 | 1612 | ||
1613 | static void max98088_sync_cache(struct snd_soc_codec *codec) | 1613 | static void max98088_sync_cache(struct snd_soc_codec *codec) |
1614 | { | 1614 | { |
1615 | u16 *reg_cache = codec->reg_cache; | 1615 | u8 *reg_cache = codec->reg_cache; |
1616 | int i; | 1616 | int i; |
1617 | 1617 | ||
1618 | if (!codec->cache_sync) | 1618 | if (!codec->cache_sync) |
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index d659d3adcfb3..6c8a9e7bee25 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c | |||
@@ -1527,6 +1527,9 @@ static int sgtl5000_i2c_probe(struct i2c_client *client, | |||
1527 | if (IS_ERR(sgtl5000->mclk)) { | 1527 | if (IS_ERR(sgtl5000->mclk)) { |
1528 | ret = PTR_ERR(sgtl5000->mclk); | 1528 | ret = PTR_ERR(sgtl5000->mclk); |
1529 | dev_err(&client->dev, "Failed to get mclock: %d\n", ret); | 1529 | dev_err(&client->dev, "Failed to get mclock: %d\n", ret); |
1530 | /* Defer the probe to see if the clk will be provided later */ | ||
1531 | if (ret == -ENOENT) | ||
1532 | return -EPROBE_DEFER; | ||
1530 | return ret; | 1533 | return ret; |
1531 | } | 1534 | } |
1532 | 1535 | ||
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-core.c b/sound/soc/soc-core.c index 0ec070cf7231..d82ee386eab5 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -3908,10 +3908,8 @@ int snd_soc_add_platform(struct device *dev, struct snd_soc_platform *platform, | |||
3908 | { | 3908 | { |
3909 | /* create platform component name */ | 3909 | /* create platform component name */ |
3910 | platform->name = fmt_single_name(dev, &platform->id); | 3910 | platform->name = fmt_single_name(dev, &platform->id); |
3911 | if (platform->name == NULL) { | 3911 | if (platform->name == NULL) |
3912 | kfree(platform); | ||
3913 | return -ENOMEM; | 3912 | return -ENOMEM; |
3914 | } | ||
3915 | 3913 | ||
3916 | platform->dev = dev; | 3914 | platform->dev = dev; |
3917 | platform->driver = platform_drv; | 3915 | platform->driver = platform_drv; |
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 | } |
2738 | EXPORT_SYMBOL_GPL(snd_soc_dapm_put_volsw); | 2738 | EXPORT_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 | } |
2886 | EXPORT_SYMBOL_GPL(snd_soc_dapm_put_enum_virt); | 2885 | EXPORT_SYMBOL_GPL(snd_soc_dapm_put_enum_virt); |
2887 | 2886 | ||
diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index e58233f7df61..6c486625321b 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c | |||
@@ -389,9 +389,9 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) | |||
389 | ac97->capture_dma_data.slave_id = of_dma[1]; | 389 | ac97->capture_dma_data.slave_id = of_dma[1]; |
390 | 390 | ||
391 | ac97->playback_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_TX1; | 391 | ac97->playback_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_TX1; |
392 | ac97->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | 392 | ac97->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; |
393 | ac97->capture_dma_data.maxburst = 4; | 393 | ac97->playback_dma_data.maxburst = 4; |
394 | ac97->capture_dma_data.slave_id = of_dma[0]; | 394 | ac97->playback_dma_data.slave_id = of_dma[1]; |
395 | 395 | ||
396 | ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev); | 396 | ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev); |
397 | if (ret) | 397 | if (ret) |
diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c index 5eaa12cdc6eb..551b3c93ce93 100644 --- a/sound/soc/tegra/tegra20_spdif.c +++ b/sound/soc/tegra/tegra20_spdif.c | |||
@@ -323,8 +323,8 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev) | |||
323 | } | 323 | } |
324 | 324 | ||
325 | spdif->playback_dma_data.addr = mem->start + TEGRA20_SPDIF_DATA_OUT; | 325 | spdif->playback_dma_data.addr = mem->start + TEGRA20_SPDIF_DATA_OUT; |
326 | spdif->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | 326 | spdif->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; |
327 | spdif->capture_dma_data.maxburst = 4; | 327 | spdif->playback_dma_data.maxburst = 4; |
328 | spdif->playback_dma_data.slave_id = dmareq->start; | 328 | spdif->playback_dma_data.slave_id = dmareq->start; |
329 | 329 | ||
330 | pm_runtime_enable(&pdev->dev); | 330 | pm_runtime_enable(&pdev->dev); |
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) | |||
110 | static int usb6fire_comm_write8(struct comm_runtime *rt, u8 request, | 110 | static 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 | ||
119 | static int usb6fire_comm_write16(struct comm_runtime *rt, u8 request, | 128 | static 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 | ||
128 | int usb6fire_comm_init(struct sfire_chip *chip) | 146 | int 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 | ||
172 | void usb6fire_comm_destroy(struct sfire_chip *chip) | 197 | void 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/6fire/pcm.c b/sound/usb/6fire/pcm.c index 2aa4e13063a8..3d2551cc10f2 100644 --- a/sound/usb/6fire/pcm.c +++ b/sound/usb/6fire/pcm.c | |||
@@ -543,7 +543,7 @@ static snd_pcm_uframes_t usb6fire_pcm_pointer( | |||
543 | snd_pcm_uframes_t ret; | 543 | snd_pcm_uframes_t ret; |
544 | 544 | ||
545 | if (rt->panic || !sub) | 545 | if (rt->panic || !sub) |
546 | return SNDRV_PCM_STATE_XRUN; | 546 | return SNDRV_PCM_POS_XRUN; |
547 | 547 | ||
548 | spin_lock_irqsave(&sub->lock, flags); | 548 | spin_lock_irqsave(&sub->lock, flags); |
549 | ret = sub->dma_off; | 549 | ret = sub->dma_off; |
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) |
diff --git a/sound/usb/hiface/pcm.c b/sound/usb/hiface/pcm.c index 6430ed2a9f65..c21a3df9a0df 100644 --- a/sound/usb/hiface/pcm.c +++ b/sound/usb/hiface/pcm.c | |||
@@ -503,7 +503,7 @@ static snd_pcm_uframes_t hiface_pcm_pointer(struct snd_pcm_substream *alsa_sub) | |||
503 | snd_pcm_uframes_t dma_offset; | 503 | snd_pcm_uframes_t dma_offset; |
504 | 504 | ||
505 | if (rt->panic || !sub) | 505 | if (rt->panic || !sub) |
506 | return SNDRV_PCM_STATE_XRUN; | 506 | return SNDRV_PCM_POS_XRUN; |
507 | 507 | ||
508 | spin_lock_irqsave(&sub->lock, flags); | 508 | spin_lock_irqsave(&sub->lock, flags); |
509 | dma_offset = sub->dma_off; | 509 | dma_offset = sub->dma_off; |