Commit 38216134 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull sound fixes from Takashi Iwai:
 "The only large LOC is seen in WM5102 driver, just writing a bunch of
  register updates, but the actual code change is small.  Other than
  that, all small fixes suitable for rc6."

* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: usb-audio: Fix mutex deadlock at disconnection
  ALSA: fm801: precedence bug in snd_fm801_tea575x_get_pins()
  ALSA: es1968: precedence bug in snd_es1968_tea575x_get_pins()
  ALSA: hda - Add a missing quirk entry for iMac 9,1
  ASoC: core: Double control update err for snd_soc_put_volsw_sx
  ASoC: dapm: Use card_list during DAPM shutdown
  ASoC: cs42l52: fix the return value of cs42l52_set_fmt()
  ASoC: bells: Correct type in sub speaker DAI name for WM5102
  ASoC: wm8978: pll incorrectly configured when codec is master
  ASoC: mxs-saif: Fix channel swap for 24-bit format
  ASoC: bells: Select WM1250-EV1 Springbank audio I/O module
  ASoC: bells: Add missing select of WM0010
  ASoC: mxs-saif: Add MODULE_ALIAS
  ASoC: wm5102: Write register value corrections after SYSCLK is enabled
parents 79e979ea 10e44239
...@@ -2581,9 +2581,14 @@ static u8 snd_es1968_tea575x_get_pins(struct snd_tea575x *tea) ...@@ -2581,9 +2581,14 @@ static u8 snd_es1968_tea575x_get_pins(struct snd_tea575x *tea)
struct es1968 *chip = tea->private_data; struct es1968 *chip = tea->private_data;
unsigned long io = chip->io_port + GPIO_DATA; unsigned long io = chip->io_port + GPIO_DATA;
u16 val = inw(io); u16 val = inw(io);
u8 ret;
return (val & STR_DATA) ? TEA575X_DATA : 0 |
(val & STR_MOST) ? TEA575X_MOST : 0; ret = 0;
if (val & STR_DATA)
ret |= TEA575X_DATA;
if (val & STR_MOST)
ret |= TEA575X_MOST;
return ret;
} }
static void snd_es1968_tea575x_set_direction(struct snd_tea575x *tea, bool output) static void snd_es1968_tea575x_set_direction(struct snd_tea575x *tea, bool output)
......
...@@ -767,9 +767,14 @@ static u8 snd_fm801_tea575x_get_pins(struct snd_tea575x *tea) ...@@ -767,9 +767,14 @@ static u8 snd_fm801_tea575x_get_pins(struct snd_tea575x *tea)
struct fm801 *chip = tea->private_data; struct fm801 *chip = tea->private_data;
unsigned short reg = inw(FM801_REG(chip, GPIO_CTRL)); unsigned short reg = inw(FM801_REG(chip, GPIO_CTRL));
struct snd_fm801_tea575x_gpio gpio = *get_tea575x_gpio(chip); struct snd_fm801_tea575x_gpio gpio = *get_tea575x_gpio(chip);
u8 ret;
return (reg & FM801_GPIO_GP(gpio.data)) ? TEA575X_DATA : 0 |
(reg & FM801_GPIO_GP(gpio.most)) ? TEA575X_MOST : 0; ret = 0;
if (reg & FM801_GPIO_GP(gpio.data))
ret |= TEA575X_DATA;
if (reg & FM801_GPIO_GP(gpio.most))
ret |= TEA575X_MOST;
return ret;
} }
static void snd_fm801_tea575x_set_direction(struct snd_tea575x *tea, bool output) static void snd_fm801_tea575x_set_direction(struct snd_tea575x *tea, bool output)
......
...@@ -5407,6 +5407,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { ...@@ -5407,6 +5407,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF), SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF),
SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF), SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF),
SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 5,1", ALC885_FIXUP_MACPRO_GPIO), SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 5,1", ALC885_FIXUP_MACPRO_GPIO),
SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF),
SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF), SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF),
SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF), SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF),
SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF), SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF),
......
...@@ -773,7 +773,6 @@ static int cs42l52_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) ...@@ -773,7 +773,6 @@ static int cs42l52_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
{ {
struct snd_soc_codec *codec = codec_dai->codec; struct snd_soc_codec *codec = codec_dai->codec;
struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec); struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec);
int ret = 0;
u8 iface = 0; u8 iface = 0;
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
...@@ -822,7 +821,7 @@ static int cs42l52_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) ...@@ -822,7 +821,7 @@ static int cs42l52_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
case SND_SOC_DAIFMT_NB_IF: case SND_SOC_DAIFMT_NB_IF:
break; break;
default: default:
ret = -EINVAL; return -EINVAL;
} }
cs42l52->config.format = iface; cs42l52->config.format = iface;
snd_soc_write(codec, CS42L52_IFACE_CTL1, cs42l52->config.format); snd_soc_write(codec, CS42L52_IFACE_CTL1, cs42l52->config.format);
......
This diff is collapsed.
...@@ -782,7 +782,7 @@ static int wm8978_hw_params(struct snd_pcm_substream *substream, ...@@ -782,7 +782,7 @@ static int wm8978_hw_params(struct snd_pcm_substream *substream,
wm8978->mclk_idx = -1; wm8978->mclk_idx = -1;
f_sel = wm8978->f_mclk; f_sel = wm8978->f_mclk;
} else { } else {
if (!wm8978->f_pllout) { if (!wm8978->f_opclk) {
/* We only enter here, if OPCLK is not used */ /* We only enter here, if OPCLK is not used */
int ret = wm8978_configure_pll(codec); int ret = wm8978_configure_pll(codec);
if (ret < 0) if (ret < 0)
......
...@@ -523,16 +523,24 @@ static int mxs_saif_trigger(struct snd_pcm_substream *substream, int cmd, ...@@ -523,16 +523,24 @@ static int mxs_saif_trigger(struct snd_pcm_substream *substream, int cmd,
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
/* /*
* write a data to saif data register to trigger * write data to saif data register to trigger
* the transfer * the transfer.
* For 24-bit format the 32-bit FIFO register stores
* only one channel, so we need to write twice.
* This is also safe for the other non 24-bit formats.
*/ */
__raw_writel(0, saif->base + SAIF_DATA); __raw_writel(0, saif->base + SAIF_DATA);
__raw_writel(0, saif->base + SAIF_DATA);
} else { } else {
/* /*
* read a data from saif data register to trigger * read data from saif data register to trigger
* the receive * the receive.
* For 24-bit format the 32-bit FIFO register stores
* only one channel, so we need to read twice.
* This is also safe for the other non 24-bit formats.
*/ */
__raw_readl(saif->base + SAIF_DATA); __raw_readl(saif->base + SAIF_DATA);
__raw_readl(saif->base + SAIF_DATA);
} }
master_saif->ongoing = 1; master_saif->ongoing = 1;
...@@ -812,3 +820,4 @@ module_platform_driver(mxs_saif_driver); ...@@ -812,3 +820,4 @@ module_platform_driver(mxs_saif_driver);
MODULE_AUTHOR("Freescale Semiconductor, Inc."); MODULE_AUTHOR("Freescale Semiconductor, Inc.");
MODULE_DESCRIPTION("MXS ASoC SAIF driver"); MODULE_DESCRIPTION("MXS ASoC SAIF driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:mxs-saif");
...@@ -207,6 +207,8 @@ config SND_SOC_BELLS ...@@ -207,6 +207,8 @@ config SND_SOC_BELLS
select SND_SOC_WM5102 select SND_SOC_WM5102
select SND_SOC_WM5110 select SND_SOC_WM5110
select SND_SOC_WM9081 select SND_SOC_WM9081
select SND_SOC_WM0010
select SND_SOC_WM1250_EV1
config SND_SOC_LOWLAND config SND_SOC_LOWLAND
tristate "Audio support for Wolfson Lowland" tristate "Audio support for Wolfson Lowland"
......
...@@ -247,7 +247,7 @@ static struct snd_soc_dai_link bells_dai_wm5110[] = { ...@@ -247,7 +247,7 @@ static struct snd_soc_dai_link bells_dai_wm5110[] = {
{ {
.name = "Sub", .name = "Sub",
.stream_name = "Sub", .stream_name = "Sub",
.cpu_dai_name = "wm5110-aif3", .cpu_dai_name = "wm5102-aif3",
.codec_dai_name = "wm9081-hifi", .codec_dai_name = "wm9081-hifi",
.codec_name = "wm9081.1-006c", .codec_name = "wm9081.1-006c",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
......
...@@ -2786,8 +2786,9 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol, ...@@ -2786,8 +2786,9 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
val = (ucontrol->value.integer.value[0] + min) & mask; val = (ucontrol->value.integer.value[0] + min) & mask;
val = val << shift; val = val << shift;
if (snd_soc_update_bits_locked(codec, reg, val_mask, val)) err = snd_soc_update_bits_locked(codec, reg, val_mask, val);
return err; if (err < 0)
return err;
if (snd_soc_volsw_is_stereo(mc)) { if (snd_soc_volsw_is_stereo(mc)) {
val_mask = mask << rshift; val_mask = mask << rshift;
......
...@@ -3745,7 +3745,7 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card) ...@@ -3745,7 +3745,7 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card)
{ {
struct snd_soc_codec *codec; struct snd_soc_codec *codec;
list_for_each_entry(codec, &card->codec_dev_list, list) { list_for_each_entry(codec, &card->codec_dev_list, card_list) {
soc_dapm_shutdown_codec(&codec->dapm); soc_dapm_shutdown_codec(&codec->dapm);
if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY)
snd_soc_dapm_set_bias_level(&codec->dapm, snd_soc_dapm_set_bias_level(&codec->dapm,
......
...@@ -559,9 +559,11 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, ...@@ -559,9 +559,11 @@ static void snd_usb_audio_disconnect(struct usb_device *dev,
return; return;
card = chip->card; card = chip->card;
mutex_lock(&register_mutex);
down_write(&chip->shutdown_rwsem); down_write(&chip->shutdown_rwsem);
chip->shutdown = 1; chip->shutdown = 1;
up_write(&chip->shutdown_rwsem);
mutex_lock(&register_mutex);
chip->num_interfaces--; chip->num_interfaces--;
if (chip->num_interfaces <= 0) { if (chip->num_interfaces <= 0) {
snd_card_disconnect(card); snd_card_disconnect(card);
...@@ -582,11 +584,9 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, ...@@ -582,11 +584,9 @@ static void snd_usb_audio_disconnect(struct usb_device *dev,
snd_usb_mixer_disconnect(p); snd_usb_mixer_disconnect(p);
} }
usb_chip[chip->index] = NULL; usb_chip[chip->index] = NULL;
up_write(&chip->shutdown_rwsem);
mutex_unlock(&register_mutex); mutex_unlock(&register_mutex);
snd_card_free_when_closed(card); snd_card_free_when_closed(card);
} else { } else {
up_write(&chip->shutdown_rwsem);
mutex_unlock(&register_mutex); mutex_unlock(&register_mutex);
} }
} }
......
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