Commit 2f853991 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "All small regression or small fixes, nothing surprising at this stage.

   - regression fix for intel Mac Mini quirk
   - compress ioctl error fix
   - ASoC fixes for control change notifications, some UI fixes,
     driver-specific fixes (resource leak, build errors, etc)"

* tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix missing fixup for Mac Mini with STAC9221
  ASoC: wm0010: Fix resource leak
  ASoC: au1x: Fix build
  ASoC: bf5xx-ac97: Fix compile error with SND_BF5XX_HAVE_COLD_RESET
  ASoC: bfin-ac97: Fix prototype error following AC'97 refactoring
  ALSA: compress: fix the return value for SNDRV_COMPRESS_VERSION
  ASoC: dapm: Fix return value of snd_soc_dapm_put_{volsw,enum_virt}()
parents 72a67a94 697aebab
...@@ -743,7 +743,7 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg) ...@@ -743,7 +743,7 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
mutex_lock(&stream->device->lock); mutex_lock(&stream->device->lock);
switch (_IOC_NR(cmd)) { switch (_IOC_NR(cmd)) {
case _IOC_NR(SNDRV_COMPRESS_IOCTL_VERSION): case _IOC_NR(SNDRV_COMPRESS_IOCTL_VERSION):
put_user(SNDRV_COMPRESS_VERSION, retval = put_user(SNDRV_COMPRESS_VERSION,
(int __user *)arg) ? -EFAULT : 0; (int __user *)arg) ? -EFAULT : 0;
break; break;
case _IOC_NR(SNDRV_COMPRESS_GET_CAPS): case _IOC_NR(SNDRV_COMPRESS_GET_CAPS):
......
...@@ -860,7 +860,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec, ...@@ -860,7 +860,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
} }
} }
if (id < 0 && quirk) { if (id < 0 && quirk) {
for (q = quirk; q->subvendor; q++) { for (q = quirk; q->subvendor || q->subdevice; q++) {
unsigned int vendorid = unsigned int vendorid =
q->subdevice | (q->subvendor << 16); q->subdevice | (q->subvendor << 16);
unsigned int mask = 0xffff0000 | q->subdevice_mask; unsigned int mask = 0xffff0000 | q->subdevice_mask;
......
...@@ -2819,6 +2819,7 @@ static const struct hda_pintbl ecs202_pin_configs[] = { ...@@ -2819,6 +2819,7 @@ static const struct hda_pintbl ecs202_pin_configs[] = {
/* codec SSIDs for Intel Mac sharing the same PCI SSID 8384:7680 */ /* codec SSIDs for Intel Mac sharing the same PCI SSID 8384:7680 */
static const struct snd_pci_quirk stac922x_intel_mac_fixup_tbl[] = { static const struct snd_pci_quirk stac922x_intel_mac_fixup_tbl[] = {
SND_PCI_QUIRK(0x0000, 0x0100, "Mac Mini", STAC_INTEL_MAC_V3),
SND_PCI_QUIRK(0x106b, 0x0800, "Mac", STAC_INTEL_MAC_V1), SND_PCI_QUIRK(0x106b, 0x0800, "Mac", STAC_INTEL_MAC_V1),
SND_PCI_QUIRK(0x106b, 0x0600, "Mac", STAC_INTEL_MAC_V2), SND_PCI_QUIRK(0x106b, 0x0600, "Mac", STAC_INTEL_MAC_V2),
SND_PCI_QUIRK(0x106b, 0x0700, "Mac", STAC_INTEL_MAC_V2), SND_PCI_QUIRK(0x106b, 0x0700, "Mac", STAC_INTEL_MAC_V2),
......
...@@ -341,7 +341,7 @@ static struct platform_driver au1xac97c_driver = { ...@@ -341,7 +341,7 @@ static struct platform_driver au1xac97c_driver = {
.remove = au1xac97c_drvremove, .remove = au1xac97c_drvremove,
}; };
module_platform_driver(&au1xac97c_driver); module_platform_driver(au1xac97c_driver);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Au1000/1500/1100 AC97C ASoC driver"); MODULE_DESCRIPTION("Au1000/1500/1100 AC97C ASoC driver");
......
...@@ -294,11 +294,12 @@ static int asoc_bfin_ac97_probe(struct platform_device *pdev) ...@@ -294,11 +294,12 @@ static int asoc_bfin_ac97_probe(struct platform_device *pdev)
/* Request PB3 as reset pin */ /* Request PB3 as reset pin */
ret = devm_gpio_request_one(&pdev->dev, ret = devm_gpio_request_one(&pdev->dev,
CONFIG_SND_BF5XX_RESET_GPIO_NUM, CONFIG_SND_BF5XX_RESET_GPIO_NUM,
GPIOF_OUT_INIT_HIGH, "SND_AD198x RESET") { GPIOF_OUT_INIT_HIGH, "SND_AD198x RESET");
if (ret) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Failed to request GPIO_%d for reset: %d\n", "Failed to request GPIO_%d for reset: %d\n",
CONFIG_SND_BF5XX_RESET_GPIO_NUM, ret); CONFIG_SND_BF5XX_RESET_GPIO_NUM, ret);
goto gpio_err; return ret;
} }
#endif #endif
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#ifndef _BF5XX_AC97_H #ifndef _BF5XX_AC97_H
#define _BF5XX_AC97_H #define _BF5XX_AC97_H
extern struct snd_ac97_bus_ops bf5xx_ac97_ops;
extern struct snd_ac97 *ac97; extern struct snd_ac97 *ac97;
/* Frame format in memory, only support stereo currently */ /* Frame format in memory, only support stereo currently */
struct ac97_frame { struct ac97_frame {
......
...@@ -410,6 +410,16 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec) ...@@ -410,6 +410,16 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec)
rec->command, rec->length); rec->command, rec->length);
len = rec->length + 8; len = rec->length + 8;
xfer = kzalloc(sizeof(*xfer), GFP_KERNEL);
if (!xfer) {
dev_err(codec->dev, "Failed to allocate xfer\n");
ret = -ENOMEM;
goto abort;
}
xfer->codec = codec;
list_add_tail(&xfer->list, &xfer_list);
out = kzalloc(len, GFP_KERNEL); out = kzalloc(len, GFP_KERNEL);
if (!out) { if (!out) {
dev_err(codec->dev, dev_err(codec->dev,
...@@ -417,6 +427,7 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec) ...@@ -417,6 +427,7 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec)
ret = -ENOMEM; ret = -ENOMEM;
goto abort1; goto abort1;
} }
xfer->t.rx_buf = out;
img = kzalloc(len, GFP_KERNEL); img = kzalloc(len, GFP_KERNEL);
if (!img) { if (!img) {
...@@ -425,24 +436,13 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec) ...@@ -425,24 +436,13 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec)
ret = -ENOMEM; ret = -ENOMEM;
goto abort1; goto abort1;
} }
xfer->t.tx_buf = img;
byte_swap_64((u64 *)&rec->command, img, len); byte_swap_64((u64 *)&rec->command, img, len);
xfer = kzalloc(sizeof(*xfer), GFP_KERNEL);
if (!xfer) {
dev_err(codec->dev, "Failed to allocate xfer\n");
ret = -ENOMEM;
goto abort1;
}
xfer->codec = codec;
list_add_tail(&xfer->list, &xfer_list);
spi_message_init(&xfer->m); spi_message_init(&xfer->m);
xfer->m.complete = wm0010_boot_xfer_complete; xfer->m.complete = wm0010_boot_xfer_complete;
xfer->m.context = xfer; xfer->m.context = xfer;
xfer->t.tx_buf = img;
xfer->t.rx_buf = out;
xfer->t.len = len; xfer->t.len = len;
xfer->t.bits_per_word = 8; xfer->t.bits_per_word = 8;
......
...@@ -2733,7 +2733,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, ...@@ -2733,7 +2733,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
} }
mutex_unlock(&card->dapm_mutex); mutex_unlock(&card->dapm_mutex);
return 0; return change;
} }
EXPORT_SYMBOL_GPL(snd_soc_dapm_put_volsw); EXPORT_SYMBOL_GPL(snd_soc_dapm_put_volsw);
...@@ -2861,7 +2861,6 @@ int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol, ...@@ -2861,7 +2861,6 @@ int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol,
struct soc_enum *e = struct soc_enum *e =
(struct soc_enum *)kcontrol->private_value; (struct soc_enum *)kcontrol->private_value;
int change; int change;
int ret = 0;
int wi; int wi;
if (ucontrol->value.enumerated.item[0] >= e->max) if (ucontrol->value.enumerated.item[0] >= e->max)
...@@ -2881,7 +2880,7 @@ int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol, ...@@ -2881,7 +2880,7 @@ int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol,
} }
mutex_unlock(&card->dapm_mutex); mutex_unlock(&card->dapm_mutex);
return ret; return change;
} }
EXPORT_SYMBOL_GPL(snd_soc_dapm_put_enum_virt); EXPORT_SYMBOL_GPL(snd_soc_dapm_put_enum_virt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment