diff options
author | Dave Airlie <airlied@redhat.com> | 2013-09-01 19:31:40 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-09-01 19:31:40 -0400 |
commit | 9c725e5bcdae59d5383d4aec33a34c822582dda5 (patch) | |
tree | 3d55827f5f44f16cb0aada2713029f7490f557d4 /sound | |
parent | efa27f9cec09518c9b574e3ab4a0a41717237429 (diff) | |
parent | 679fe80fbe964ea7f9f71781c2ca65b630949da3 (diff) |
Merge branch 'drm-next-3.12' of git://people.freedesktop.org/~agd5f/linux into drm-next
Alex writes:
This is the radeon drm-next request. Big changes include:
- support for dpm on CIK parts
- support for ASPM on CIK parts
- support for berlin GPUs
- major ring handling cleanup
- remove the old 3D blit code for bo moves in favor of CP DMA or sDMA
- lots of bug fixes
[airlied: fix up a bunch of conflicts from drm_order removal]
* 'drm-next-3.12' of git://people.freedesktop.org/~agd5f/linux: (898 commits)
drm/radeon/dpm: make sure dc performance level limits are valid (CI)
drm/radeon/dpm: make sure dc performance level limits are valid (BTC-SI) (v2)
drm/radeon: gcc fixes for extended dpm tables
drm/radeon: gcc fixes for kb/kv dpm
drm/radeon: gcc fixes for ci dpm
drm/radeon: gcc fixes for si dpm
drm/radeon: gcc fixes for ni dpm
drm/radeon: gcc fixes for trinity dpm
drm/radeon: gcc fixes for sumo dpm
drm/radeonn: gcc fixes for rv7xx/eg/btc dpm
drm/radeon: gcc fixes for rv6xx dpm
drm/radeon: gcc fixes for radeon_atombios.c
drm/radeon: enable UVD interrupts on CIK
drm/radeon: fix init ordering for r600+
drm/radeon/dpm: only need to reprogram uvd if uvd pg is enabled
drm/radeon: check the return value of uvd_v1_0_start in uvd_v1_0_init
drm/radeon: split out radeon_uvd_resume from uvd_v4_2_resume
radeon kms: fix uninitialised hotplug work usage in r100_irq_process()
drm/radeon/audio: set up the sads on DCE3.2 asics
drm/radeon: fix handling of variable sized arrays for router objects
...
Conflicts:
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_gem_dmabuf.c
drivers/gpu/drm/i915/intel_pm.c
drivers/gpu/drm/radeon/cik.c
drivers/gpu/drm/radeon/ni.c
drivers/gpu/drm/radeon/r600.c
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/hda_generic.c | 6 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 11 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 1 | ||||
-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/codecs/cs42l52.c | 5 | ||||
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 18 | ||||
-rw-r--r-- | sound/soc/codecs/wm0010.c | 24 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 12 | ||||
-rw-r--r-- | sound/soc/tegra/tegra30_i2s.c | 2 | ||||
-rw-r--r-- | sound/usb/6fire/comm.c | 38 | ||||
-rw-r--r-- | sound/usb/6fire/comm.h | 2 | ||||
-rw-r--r-- | sound/usb/6fire/midi.c | 16 | ||||
-rw-r--r-- | sound/usb/6fire/midi.h | 6 | ||||
-rw-r--r-- | sound/usb/6fire/pcm.c | 41 | ||||
-rw-r--r-- | sound/usb/6fire/pcm.h | 2 | ||||
-rw-r--r-- | sound/usb/endpoint.c | 13 | ||||
-rw-r--r-- | sound/usb/mixer.c | 1 | ||||
-rw-r--r-- | sound/usb/quirks.c | 6 |
22 files changed, 159 insertions, 57 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/hda_generic.c b/sound/pci/hda/hda_generic.c index 8e77cbbad871..e3c7ba8d7582 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c | |||
@@ -522,7 +522,7 @@ static bool same_amp_caps(struct hda_codec *codec, hda_nid_t nid1, | |||
522 | } | 522 | } |
523 | 523 | ||
524 | #define nid_has_mute(codec, nid, dir) \ | 524 | #define nid_has_mute(codec, nid, dir) \ |
525 | check_amp_caps(codec, nid, dir, AC_AMPCAP_MUTE) | 525 | check_amp_caps(codec, nid, dir, (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE)) |
526 | #define nid_has_volume(codec, nid, dir) \ | 526 | #define nid_has_volume(codec, nid, dir) \ |
527 | check_amp_caps(codec, nid, dir, AC_AMPCAP_NUM_STEPS) | 527 | check_amp_caps(codec, nid, dir, AC_AMPCAP_NUM_STEPS) |
528 | 528 | ||
@@ -624,7 +624,7 @@ static int get_amp_val_to_activate(struct hda_codec *codec, hda_nid_t nid, | |||
624 | if (enable) | 624 | if (enable) |
625 | val = (caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT; | 625 | val = (caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT; |
626 | } | 626 | } |
627 | if (caps & AC_AMPCAP_MUTE) { | 627 | if (caps & (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE)) { |
628 | if (!enable) | 628 | if (!enable) |
629 | val |= HDA_AMP_MUTE; | 629 | val |= HDA_AMP_MUTE; |
630 | } | 630 | } |
@@ -648,7 +648,7 @@ static unsigned int get_amp_mask_to_modify(struct hda_codec *codec, | |||
648 | { | 648 | { |
649 | unsigned int mask = 0xff; | 649 | unsigned int mask = 0xff; |
650 | 650 | ||
651 | if (caps & AC_AMPCAP_MUTE) { | 651 | if (caps & (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE)) { |
652 | if (is_ctl_associated(codec, nid, dir, idx, NID_PATH_MUTE_CTL)) | 652 | if (is_ctl_associated(codec, nid, dir, idx, NID_PATH_MUTE_CTL)) |
653 | mask &= ~0x80; | 653 | mask &= ~0x80; |
654 | } | 654 | } |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8bd226149868..f303cd898515 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1031,6 +1031,7 @@ enum { | |||
1031 | ALC880_FIXUP_GPIO2, | 1031 | ALC880_FIXUP_GPIO2, |
1032 | ALC880_FIXUP_MEDION_RIM, | 1032 | ALC880_FIXUP_MEDION_RIM, |
1033 | ALC880_FIXUP_LG, | 1033 | ALC880_FIXUP_LG, |
1034 | ALC880_FIXUP_LG_LW25, | ||
1034 | ALC880_FIXUP_W810, | 1035 | ALC880_FIXUP_W810, |
1035 | ALC880_FIXUP_EAPD_COEF, | 1036 | ALC880_FIXUP_EAPD_COEF, |
1036 | ALC880_FIXUP_TCL_S700, | 1037 | ALC880_FIXUP_TCL_S700, |
@@ -1089,6 +1090,14 @@ static const struct hda_fixup alc880_fixups[] = { | |||
1089 | { } | 1090 | { } |
1090 | } | 1091 | } |
1091 | }, | 1092 | }, |
1093 | [ALC880_FIXUP_LG_LW25] = { | ||
1094 | .type = HDA_FIXUP_PINS, | ||
1095 | .v.pins = (const struct hda_pintbl[]) { | ||
1096 | { 0x1a, 0x0181344f }, /* line-in */ | ||
1097 | { 0x1b, 0x0321403f }, /* headphone */ | ||
1098 | { } | ||
1099 | } | ||
1100 | }, | ||
1092 | [ALC880_FIXUP_W810] = { | 1101 | [ALC880_FIXUP_W810] = { |
1093 | .type = HDA_FIXUP_PINS, | 1102 | .type = HDA_FIXUP_PINS, |
1094 | .v.pins = (const struct hda_pintbl[]) { | 1103 | .v.pins = (const struct hda_pintbl[]) { |
@@ -1341,6 +1350,7 @@ static const struct snd_pci_quirk alc880_fixup_tbl[] = { | |||
1341 | SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_FIXUP_LG), | 1350 | SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_FIXUP_LG), |
1342 | SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_FIXUP_LG), | 1351 | SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_FIXUP_LG), |
1343 | SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_FIXUP_LG), | 1352 | SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_FIXUP_LG), |
1353 | SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_FIXUP_LG_LW25), | ||
1344 | SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_FIXUP_TCL_S700), | 1354 | SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_FIXUP_TCL_S700), |
1345 | 1355 | ||
1346 | /* Below is the copied entries from alc880_quirks.c. | 1356 | /* Below is the copied entries from alc880_quirks.c. |
@@ -4329,6 +4339,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = { | |||
4329 | SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE), | 4339 | SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE), |
4330 | SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE), | 4340 | SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE), |
4331 | SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC), | 4341 | SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC), |
4342 | SND_PCI_QUIRK(0x1025, 0x034a, "Gateway LT27", ALC662_FIXUP_INV_DMIC), | ||
4332 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), | 4343 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), |
4333 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 4344 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
4334 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 4345 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
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 */ |
2821 | 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), | ||
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 | ||
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/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 987f728718c5..be2ba1b6fe4a 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c | |||
@@ -195,6 +195,8 @@ static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0); | |||
195 | 195 | ||
196 | static DECLARE_TLV_DB_SCALE(mix_tlv, -50, 50, 0); | 196 | static DECLARE_TLV_DB_SCALE(mix_tlv, -50, 50, 0); |
197 | 197 | ||
198 | static DECLARE_TLV_DB_SCALE(beep_tlv, -56, 200, 0); | ||
199 | |||
198 | static const unsigned int limiter_tlv[] = { | 200 | static const unsigned int limiter_tlv[] = { |
199 | TLV_DB_RANGE_HEAD(2), | 201 | TLV_DB_RANGE_HEAD(2), |
200 | 0, 2, TLV_DB_SCALE_ITEM(-3000, 600, 0), | 202 | 0, 2, TLV_DB_SCALE_ITEM(-3000, 600, 0), |
@@ -451,7 +453,8 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = { | |||
451 | SOC_ENUM("Beep Pitch", beep_pitch_enum), | 453 | SOC_ENUM("Beep Pitch", beep_pitch_enum), |
452 | SOC_ENUM("Beep on Time", beep_ontime_enum), | 454 | SOC_ENUM("Beep on Time", beep_ontime_enum), |
453 | SOC_ENUM("Beep off Time", beep_offtime_enum), | 455 | SOC_ENUM("Beep off Time", beep_offtime_enum), |
454 | SOC_SINGLE_TLV("Beep Volume", CS42L52_BEEP_VOL, 0, 0x1f, 0x07, hl_tlv), | 456 | SOC_SINGLE_SX_TLV("Beep Volume", CS42L52_BEEP_VOL, |
457 | 0, 0x07, 0x1f, beep_tlv), | ||
455 | SOC_SINGLE("Beep Mixer Switch", CS42L52_BEEP_TONE_CTL, 5, 1, 1), | 458 | SOC_SINGLE("Beep Mixer Switch", CS42L52_BEEP_TONE_CTL, 5, 1, 1), |
456 | SOC_ENUM("Beep Treble Corner Freq", beep_treble_enum), | 459 | SOC_ENUM("Beep Treble Corner Freq", beep_treble_enum), |
457 | SOC_ENUM("Beep Bass Corner Freq", beep_bass_enum), | 460 | SOC_ENUM("Beep Bass Corner Freq", beep_bass_enum), |
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 6c8a9e7bee25..760e8bfeacaa 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c | |||
@@ -153,6 +153,8 @@ static int mic_bias_event(struct snd_soc_dapm_widget *w, | |||
153 | static int power_vag_event(struct snd_soc_dapm_widget *w, | 153 | static int power_vag_event(struct snd_soc_dapm_widget *w, |
154 | struct snd_kcontrol *kcontrol, int event) | 154 | struct snd_kcontrol *kcontrol, int event) |
155 | { | 155 | { |
156 | const u32 mask = SGTL5000_DAC_POWERUP | SGTL5000_ADC_POWERUP; | ||
157 | |||
156 | switch (event) { | 158 | switch (event) { |
157 | case SND_SOC_DAPM_POST_PMU: | 159 | case SND_SOC_DAPM_POST_PMU: |
158 | snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER, | 160 | snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER, |
@@ -160,9 +162,17 @@ static int power_vag_event(struct snd_soc_dapm_widget *w, | |||
160 | break; | 162 | break; |
161 | 163 | ||
162 | case SND_SOC_DAPM_PRE_PMD: | 164 | case SND_SOC_DAPM_PRE_PMD: |
163 | snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER, | 165 | /* |
164 | SGTL5000_VAG_POWERUP, 0); | 166 | * Don't clear VAG_POWERUP, when both DAC and ADC are |
165 | msleep(400); | 167 | * operational to prevent inadvertently starving the |
168 | * other one of them. | ||
169 | */ | ||
170 | if ((snd_soc_read(w->codec, SGTL5000_CHIP_ANA_POWER) & | ||
171 | mask) != mask) { | ||
172 | snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER, | ||
173 | SGTL5000_VAG_POWERUP, 0); | ||
174 | msleep(400); | ||
175 | } | ||
166 | break; | 176 | break; |
167 | default: | 177 | default: |
168 | break; | 178 | break; |
@@ -388,7 +398,7 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = { | |||
388 | SOC_DOUBLE("Capture Volume", SGTL5000_CHIP_ANA_ADC_CTRL, 0, 4, 0xf, 0), | 398 | SOC_DOUBLE("Capture Volume", SGTL5000_CHIP_ANA_ADC_CTRL, 0, 4, 0xf, 0), |
389 | SOC_SINGLE_TLV("Capture Attenuate Switch (-6dB)", | 399 | SOC_SINGLE_TLV("Capture Attenuate Switch (-6dB)", |
390 | SGTL5000_CHIP_ANA_ADC_CTRL, | 400 | SGTL5000_CHIP_ANA_ADC_CTRL, |
391 | 8, 2, 0, capture_6db_attenuate), | 401 | 8, 1, 0, capture_6db_attenuate), |
392 | SOC_SINGLE("Capture ZC Switch", SGTL5000_CHIP_ANA_CTRL, 1, 1, 0), | 402 | SOC_SINGLE("Capture ZC Switch", SGTL5000_CHIP_ANA_CTRL, 1, 1, 0), |
393 | 403 | ||
394 | SOC_DOUBLE_TLV("Headphone Playback Volume", | 404 | SOC_DOUBLE_TLV("Headphone Playback Volume", |
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..4375c9f2b791 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -679,13 +679,14 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w) | |||
679 | return -EINVAL; | 679 | return -EINVAL; |
680 | } | 680 | } |
681 | 681 | ||
682 | path = list_first_entry(&w->sources, struct snd_soc_dapm_path, | 682 | if (list_empty(&w->sources)) { |
683 | list_sink); | ||
684 | if (!path) { | ||
685 | dev_err(dapm->dev, "ASoC: mux %s has no paths\n", w->name); | 683 | dev_err(dapm->dev, "ASoC: mux %s has no paths\n", w->name); |
686 | return -EINVAL; | 684 | return -EINVAL; |
687 | } | 685 | } |
688 | 686 | ||
687 | path = list_first_entry(&w->sources, struct snd_soc_dapm_path, | ||
688 | list_sink); | ||
689 | |||
689 | ret = dapm_create_or_share_mixmux_kcontrol(w, 0, path); | 690 | ret = dapm_create_or_share_mixmux_kcontrol(w, 0, path); |
690 | if (ret < 0) | 691 | if (ret < 0) |
691 | return ret; | 692 | return ret; |
@@ -2733,7 +2734,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, | |||
2733 | } | 2734 | } |
2734 | 2735 | ||
2735 | mutex_unlock(&card->dapm_mutex); | 2736 | mutex_unlock(&card->dapm_mutex); |
2736 | return 0; | 2737 | return change; |
2737 | } | 2738 | } |
2738 | EXPORT_SYMBOL_GPL(snd_soc_dapm_put_volsw); | 2739 | EXPORT_SYMBOL_GPL(snd_soc_dapm_put_volsw); |
2739 | 2740 | ||
@@ -2861,7 +2862,6 @@ int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol, | |||
2861 | struct soc_enum *e = | 2862 | struct soc_enum *e = |
2862 | (struct soc_enum *)kcontrol->private_value; | 2863 | (struct soc_enum *)kcontrol->private_value; |
2863 | int change; | 2864 | int change; |
2864 | int ret = 0; | ||
2865 | int wi; | 2865 | int wi; |
2866 | 2866 | ||
2867 | if (ucontrol->value.enumerated.item[0] >= e->max) | 2867 | if (ucontrol->value.enumerated.item[0] >= e->max) |
@@ -2881,7 +2881,7 @@ int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol, | |||
2881 | } | 2881 | } |
2882 | 2882 | ||
2883 | mutex_unlock(&card->dapm_mutex); | 2883 | mutex_unlock(&card->dapm_mutex); |
2884 | return ret; | 2884 | return change; |
2885 | } | 2885 | } |
2886 | EXPORT_SYMBOL_GPL(snd_soc_dapm_put_enum_virt); | 2886 | EXPORT_SYMBOL_GPL(snd_soc_dapm_put_enum_virt); |
2887 | 2887 | ||
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index d04146cad61f..47565fd04505 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc/tegra/tegra30_i2s.c | |||
@@ -228,7 +228,7 @@ static int tegra30_i2s_hw_params(struct snd_pcm_substream *substream, | |||
228 | reg = TEGRA30_I2S_CIF_RX_CTRL; | 228 | reg = TEGRA30_I2S_CIF_RX_CTRL; |
229 | } else { | 229 | } else { |
230 | val |= TEGRA30_AUDIOCIF_CTRL_DIRECTION_TX; | 230 | val |= TEGRA30_AUDIOCIF_CTRL_DIRECTION_TX; |
231 | reg = TEGRA30_I2S_CIF_RX_CTRL; | 231 | reg = TEGRA30_I2S_CIF_TX_CTRL; |
232 | } | 232 | } |
233 | 233 | ||
234 | regmap_write(i2s->regmap, reg, val); | 234 | regmap_write(i2s->regmap, reg, val); |
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/midi.c b/sound/usb/6fire/midi.c index 26722423330d..f3dd7266c391 100644 --- a/sound/usb/6fire/midi.c +++ b/sound/usb/6fire/midi.c | |||
@@ -19,6 +19,10 @@ | |||
19 | #include "chip.h" | 19 | #include "chip.h" |
20 | #include "comm.h" | 20 | #include "comm.h" |
21 | 21 | ||
22 | enum { | ||
23 | MIDI_BUFSIZE = 64 | ||
24 | }; | ||
25 | |||
22 | static void usb6fire_midi_out_handler(struct urb *urb) | 26 | static void usb6fire_midi_out_handler(struct urb *urb) |
23 | { | 27 | { |
24 | struct midi_runtime *rt = urb->context; | 28 | struct midi_runtime *rt = urb->context; |
@@ -156,6 +160,12 @@ int usb6fire_midi_init(struct sfire_chip *chip) | |||
156 | if (!rt) | 160 | if (!rt) |
157 | return -ENOMEM; | 161 | return -ENOMEM; |
158 | 162 | ||
163 | rt->out_buffer = kzalloc(MIDI_BUFSIZE, GFP_KERNEL); | ||
164 | if (!rt->out_buffer) { | ||
165 | kfree(rt); | ||
166 | return -ENOMEM; | ||
167 | } | ||
168 | |||
159 | rt->chip = chip; | 169 | rt->chip = chip; |
160 | rt->in_received = usb6fire_midi_in_received; | 170 | rt->in_received = usb6fire_midi_in_received; |
161 | rt->out_buffer[0] = 0x80; /* 'send midi' command */ | 171 | rt->out_buffer[0] = 0x80; /* 'send midi' command */ |
@@ -169,6 +179,7 @@ int usb6fire_midi_init(struct sfire_chip *chip) | |||
169 | 179 | ||
170 | ret = snd_rawmidi_new(chip->card, "6FireUSB", 0, 1, 1, &rt->instance); | 180 | ret = snd_rawmidi_new(chip->card, "6FireUSB", 0, 1, 1, &rt->instance); |
171 | if (ret < 0) { | 181 | if (ret < 0) { |
182 | kfree(rt->out_buffer); | ||
172 | kfree(rt); | 183 | kfree(rt); |
173 | snd_printk(KERN_ERR PREFIX "unable to create midi.\n"); | 184 | snd_printk(KERN_ERR PREFIX "unable to create midi.\n"); |
174 | return ret; | 185 | return ret; |
@@ -197,6 +208,9 @@ void usb6fire_midi_abort(struct sfire_chip *chip) | |||
197 | 208 | ||
198 | void usb6fire_midi_destroy(struct sfire_chip *chip) | 209 | void usb6fire_midi_destroy(struct sfire_chip *chip) |
199 | { | 210 | { |
200 | kfree(chip->midi); | 211 | struct midi_runtime *rt = chip->midi; |
212 | |||
213 | kfree(rt->out_buffer); | ||
214 | kfree(rt); | ||
201 | chip->midi = NULL; | 215 | chip->midi = NULL; |
202 | } | 216 | } |
diff --git a/sound/usb/6fire/midi.h b/sound/usb/6fire/midi.h index c321006e5430..84851b9f5559 100644 --- a/sound/usb/6fire/midi.h +++ b/sound/usb/6fire/midi.h | |||
@@ -16,10 +16,6 @@ | |||
16 | 16 | ||
17 | #include "common.h" | 17 | #include "common.h" |
18 | 18 | ||
19 | enum { | ||
20 | MIDI_BUFSIZE = 64 | ||
21 | }; | ||
22 | |||
23 | struct midi_runtime { | 19 | struct midi_runtime { |
24 | struct sfire_chip *chip; | 20 | struct sfire_chip *chip; |
25 | struct snd_rawmidi *instance; | 21 | struct snd_rawmidi *instance; |
@@ -32,7 +28,7 @@ struct midi_runtime { | |||
32 | struct snd_rawmidi_substream *out; | 28 | struct snd_rawmidi_substream *out; |
33 | struct urb out_urb; | 29 | struct urb out_urb; |
34 | u8 out_serial; /* serial number of out packet */ | 30 | u8 out_serial; /* serial number of out packet */ |
35 | u8 out_buffer[MIDI_BUFSIZE]; | 31 | u8 *out_buffer; |
36 | int buffer_offset; | 32 | int buffer_offset; |
37 | 33 | ||
38 | void (*in_received)(struct midi_runtime *rt, u8 *data, int length); | 34 | void (*in_received)(struct midi_runtime *rt, u8 *data, int length); |
diff --git a/sound/usb/6fire/pcm.c b/sound/usb/6fire/pcm.c index 3d2551cc10f2..b5eb97fdc842 100644 --- a/sound/usb/6fire/pcm.c +++ b/sound/usb/6fire/pcm.c | |||
@@ -582,6 +582,33 @@ static void usb6fire_pcm_init_urb(struct pcm_urb *urb, | |||
582 | urb->instance.number_of_packets = PCM_N_PACKETS_PER_URB; | 582 | urb->instance.number_of_packets = PCM_N_PACKETS_PER_URB; |
583 | } | 583 | } |
584 | 584 | ||
585 | static int usb6fire_pcm_buffers_init(struct pcm_runtime *rt) | ||
586 | { | ||
587 | int i; | ||
588 | |||
589 | for (i = 0; i < PCM_N_URBS; i++) { | ||
590 | rt->out_urbs[i].buffer = kzalloc(PCM_N_PACKETS_PER_URB | ||
591 | * PCM_MAX_PACKET_SIZE, GFP_KERNEL); | ||
592 | if (!rt->out_urbs[i].buffer) | ||
593 | return -ENOMEM; | ||
594 | rt->in_urbs[i].buffer = kzalloc(PCM_N_PACKETS_PER_URB | ||
595 | * PCM_MAX_PACKET_SIZE, GFP_KERNEL); | ||
596 | if (!rt->in_urbs[i].buffer) | ||
597 | return -ENOMEM; | ||
598 | } | ||
599 | return 0; | ||
600 | } | ||
601 | |||
602 | static void usb6fire_pcm_buffers_destroy(struct pcm_runtime *rt) | ||
603 | { | ||
604 | int i; | ||
605 | |||
606 | for (i = 0; i < PCM_N_URBS; i++) { | ||
607 | kfree(rt->out_urbs[i].buffer); | ||
608 | kfree(rt->in_urbs[i].buffer); | ||
609 | } | ||
610 | } | ||
611 | |||
585 | int usb6fire_pcm_init(struct sfire_chip *chip) | 612 | int usb6fire_pcm_init(struct sfire_chip *chip) |
586 | { | 613 | { |
587 | int i; | 614 | int i; |
@@ -593,6 +620,13 @@ int usb6fire_pcm_init(struct sfire_chip *chip) | |||
593 | if (!rt) | 620 | if (!rt) |
594 | return -ENOMEM; | 621 | return -ENOMEM; |
595 | 622 | ||
623 | ret = usb6fire_pcm_buffers_init(rt); | ||
624 | if (ret) { | ||
625 | usb6fire_pcm_buffers_destroy(rt); | ||
626 | kfree(rt); | ||
627 | return ret; | ||
628 | } | ||
629 | |||
596 | rt->chip = chip; | 630 | rt->chip = chip; |
597 | rt->stream_state = STREAM_DISABLED; | 631 | rt->stream_state = STREAM_DISABLED; |
598 | rt->rate = ARRAY_SIZE(rates); | 632 | rt->rate = ARRAY_SIZE(rates); |
@@ -614,6 +648,7 @@ int usb6fire_pcm_init(struct sfire_chip *chip) | |||
614 | 648 | ||
615 | ret = snd_pcm_new(chip->card, "DMX6FireUSB", 0, 1, 1, &pcm); | 649 | ret = snd_pcm_new(chip->card, "DMX6FireUSB", 0, 1, 1, &pcm); |
616 | if (ret < 0) { | 650 | if (ret < 0) { |
651 | usb6fire_pcm_buffers_destroy(rt); | ||
617 | kfree(rt); | 652 | kfree(rt); |
618 | snd_printk(KERN_ERR PREFIX "cannot create pcm instance.\n"); | 653 | snd_printk(KERN_ERR PREFIX "cannot create pcm instance.\n"); |
619 | return ret; | 654 | return ret; |
@@ -625,6 +660,7 @@ int usb6fire_pcm_init(struct sfire_chip *chip) | |||
625 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &pcm_ops); | 660 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &pcm_ops); |
626 | 661 | ||
627 | if (ret) { | 662 | if (ret) { |
663 | usb6fire_pcm_buffers_destroy(rt); | ||
628 | kfree(rt); | 664 | kfree(rt); |
629 | snd_printk(KERN_ERR PREFIX | 665 | snd_printk(KERN_ERR PREFIX |
630 | "error preallocating pcm buffers.\n"); | 666 | "error preallocating pcm buffers.\n"); |
@@ -669,6 +705,9 @@ void usb6fire_pcm_abort(struct sfire_chip *chip) | |||
669 | 705 | ||
670 | void usb6fire_pcm_destroy(struct sfire_chip *chip) | 706 | void usb6fire_pcm_destroy(struct sfire_chip *chip) |
671 | { | 707 | { |
672 | kfree(chip->pcm); | 708 | struct pcm_runtime *rt = chip->pcm; |
709 | |||
710 | usb6fire_pcm_buffers_destroy(rt); | ||
711 | kfree(rt); | ||
673 | chip->pcm = NULL; | 712 | chip->pcm = NULL; |
674 | } | 713 | } |
diff --git a/sound/usb/6fire/pcm.h b/sound/usb/6fire/pcm.h index 9b01133ee3fe..f5779d6182c6 100644 --- a/sound/usb/6fire/pcm.h +++ b/sound/usb/6fire/pcm.h | |||
@@ -32,7 +32,7 @@ struct pcm_urb { | |||
32 | struct urb instance; | 32 | struct urb instance; |
33 | struct usb_iso_packet_descriptor packets[PCM_N_PACKETS_PER_URB]; | 33 | struct usb_iso_packet_descriptor packets[PCM_N_PACKETS_PER_URB]; |
34 | /* END DO NOT SEPARATE */ | 34 | /* END DO NOT SEPARATE */ |
35 | u8 buffer[PCM_N_PACKETS_PER_URB * PCM_MAX_PACKET_SIZE]; | 35 | u8 *buffer; |
36 | 36 | ||
37 | struct pcm_urb *peer; | 37 | struct pcm_urb *peer; |
38 | }; | 38 | }; |
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/mixer.c b/sound/usb/mixer.c index d5438083fd6a..95558ef4a7a0 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c | |||
@@ -888,6 +888,7 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval, | |||
888 | case USB_ID(0x046d, 0x081b): /* HD Webcam c310 */ | 888 | case USB_ID(0x046d, 0x081b): /* HD Webcam c310 */ |
889 | case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */ | 889 | case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */ |
890 | case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */ | 890 | case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */ |
891 | case USB_ID(0x046d, 0x0826): /* HD Webcam c525 */ | ||
891 | case USB_ID(0x046d, 0x0991): | 892 | case USB_ID(0x046d, 0x0991): |
892 | /* Most audio usb devices lie about volume resolution. | 893 | /* Most audio usb devices lie about volume resolution. |
893 | * Most Logitech webcams have res = 384. | 894 | * Most Logitech webcams have res = 384. |
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 1bc45e71f1fe..0df9ede99dfd 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c | |||
@@ -319,19 +319,19 @@ static int create_auto_midi_quirk(struct snd_usb_audio *chip, | |||
319 | if (altsd->bNumEndpoints < 1) | 319 | if (altsd->bNumEndpoints < 1) |
320 | return -ENODEV; | 320 | return -ENODEV; |
321 | epd = get_endpoint(alts, 0); | 321 | epd = get_endpoint(alts, 0); |
322 | if (!usb_endpoint_xfer_bulk(epd) || | 322 | if (!usb_endpoint_xfer_bulk(epd) && |
323 | !usb_endpoint_xfer_int(epd)) | 323 | !usb_endpoint_xfer_int(epd)) |
324 | return -ENODEV; | 324 | return -ENODEV; |
325 | 325 | ||
326 | switch (USB_ID_VENDOR(chip->usb_id)) { | 326 | switch (USB_ID_VENDOR(chip->usb_id)) { |
327 | case 0x0499: /* Yamaha */ | 327 | case 0x0499: /* Yamaha */ |
328 | err = create_yamaha_midi_quirk(chip, iface, driver, alts); | 328 | err = create_yamaha_midi_quirk(chip, iface, driver, alts); |
329 | if (err < 0 && err != -ENODEV) | 329 | if (err != -ENODEV) |
330 | return err; | 330 | return err; |
331 | break; | 331 | break; |
332 | case 0x0582: /* Roland */ | 332 | case 0x0582: /* Roland */ |
333 | err = create_roland_midi_quirk(chip, iface, driver, alts); | 333 | err = create_roland_midi_quirk(chip, iface, driver, alts); |
334 | if (err < 0 && err != -ENODEV) | 334 | if (err != -ENODEV) |
335 | return err; | 335 | return err; |
336 | break; | 336 | break; |
337 | } | 337 | } |