Commit 8f074a55 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:
 "Just a handful of regression and small fixes in ASoC, HD-audio and
  USB-audio drivers.

   - Sigmetal HD-audio codec regression fixes
   - A copule of XRUN indication fixes for usb-audio devices
   - ASoC: ep93xx build fix, sgtl5000 fix for probe order changes,
     max98088 register access fix, etc"

* tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hiface: return correct XRUN indication
  ASoC: tegra: correct playback_dma_data setup
  ASoC: core: double free in snd_soc_add_platform()
  ALSA: usb-audio: 6fire: return correct XRUN indication
  ASoC: ep93xx: fix build of ep93xx-ac97.c
  ALSA: hda - Remove NO_PRESENCE bit override for Dell 1420n Laptop
  ALSA: hda - Fix EAPD GPIO control for Sigmatel codecs
  ASoC: atmel-ssc: remove clk_disable_unprepare call from critical section
  ASoC: sgtl5000: defer the probe if clock is not found
  ASoC: max98088 - fix element type of the register cache.
parents 6c4155a9 43cbd286
...@@ -66,14 +66,19 @@ EXPORT_SYMBOL(ssc_request); ...@@ -66,14 +66,19 @@ EXPORT_SYMBOL(ssc_request);
void ssc_free(struct ssc_device *ssc) void ssc_free(struct ssc_device *ssc)
{ {
bool disable_clk = true;
spin_lock(&user_lock); spin_lock(&user_lock);
if (ssc->user) { if (ssc->user)
ssc->user--; ssc->user--;
clk_disable_unprepare(ssc->clk); else {
} else { disable_clk = false;
dev_dbg(&ssc->pdev->dev, "device already free\n"); dev_dbg(&ssc->pdev->dev, "device already free\n");
} }
spin_unlock(&user_lock); spin_unlock(&user_lock);
if (disable_clk)
clk_disable_unprepare(ssc->clk);
} }
EXPORT_SYMBOL(ssc_free); EXPORT_SYMBOL(ssc_free);
......
...@@ -417,9 +417,11 @@ static void stac_update_outputs(struct hda_codec *codec) ...@@ -417,9 +417,11 @@ static void stac_update_outputs(struct hda_codec *codec)
val &= ~spec->eapd_mask; val &= ~spec->eapd_mask;
else else
val |= spec->eapd_mask; val |= spec->eapd_mask;
if (spec->gpio_data != val) if (spec->gpio_data != val) {
spec->gpio_data = val;
stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir,
val); val);
}
} }
} }
...@@ -3231,7 +3233,7 @@ static const struct hda_fixup stac927x_fixups[] = { ...@@ -3231,7 +3233,7 @@ static const struct hda_fixup stac927x_fixups[] = {
/* configure the analog microphone on some laptops */ /* configure the analog microphone on some laptops */
{ 0x0c, 0x90a79130 }, { 0x0c, 0x90a79130 },
/* correct the front output jack as a hp out */ /* correct the front output jack as a hp out */
{ 0x0f, 0x0227011f }, { 0x0f, 0x0221101f },
/* correct the front input jack as a mic */ /* correct the front input jack as a mic */
{ 0x0e, 0x02a79130 }, { 0x0e, 0x02a79130 },
{} {}
...@@ -3612,20 +3614,18 @@ static int stac_parse_auto_config(struct hda_codec *codec) ...@@ -3612,20 +3614,18 @@ static int stac_parse_auto_config(struct hda_codec *codec)
static int stac_init(struct hda_codec *codec) static int stac_init(struct hda_codec *codec)
{ {
struct sigmatel_spec *spec = codec->spec; struct sigmatel_spec *spec = codec->spec;
unsigned int gpio;
int i; int i;
/* override some hints */ /* override some hints */
stac_store_hints(codec); stac_store_hints(codec);
/* set up GPIO */ /* set up GPIO */
gpio = spec->gpio_data;
/* turn on EAPD statically when spec->eapd_switch isn't set. /* turn on EAPD statically when spec->eapd_switch isn't set.
* otherwise, unsol event will turn it on/off dynamically * otherwise, unsol event will turn it on/off dynamically
*/ */
if (!spec->eapd_switch) if (!spec->eapd_switch)
gpio |= spec->eapd_mask; spec->gpio_data |= spec->eapd_mask;
stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, gpio); stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, spec->gpio_data);
snd_hda_gen_init(codec); snd_hda_gen_init(codec);
...@@ -3915,6 +3915,7 @@ static void stac_setup_gpio(struct hda_codec *codec) ...@@ -3915,6 +3915,7 @@ static void stac_setup_gpio(struct hda_codec *codec)
{ {
struct sigmatel_spec *spec = codec->spec; struct sigmatel_spec *spec = codec->spec;
spec->gpio_mask |= spec->eapd_mask;
if (spec->gpio_led) { if (spec->gpio_led) {
if (!spec->vref_mute_led_nid) { if (!spec->vref_mute_led_nid) {
spec->gpio_mask |= spec->gpio_led; spec->gpio_mask |= spec->gpio_led;
......
...@@ -102,13 +102,13 @@ static struct ep93xx_ac97_info *ep93xx_ac97_info; ...@@ -102,13 +102,13 @@ static struct ep93xx_ac97_info *ep93xx_ac97_info;
static struct ep93xx_dma_data ep93xx_ac97_pcm_out = { static struct ep93xx_dma_data ep93xx_ac97_pcm_out = {
.name = "ac97-pcm-out", .name = "ac97-pcm-out",
.dma_port = EP93XX_DMA_AAC1, .port = EP93XX_DMA_AAC1,
.direction = DMA_MEM_TO_DEV, .direction = DMA_MEM_TO_DEV,
}; };
static struct ep93xx_dma_data ep93xx_ac97_pcm_in = { static struct ep93xx_dma_data ep93xx_ac97_pcm_in = {
.name = "ac97-pcm-in", .name = "ac97-pcm-in",
.dma_port = EP93XX_DMA_AAC1, .port = EP93XX_DMA_AAC1,
.direction = DMA_DEV_TO_MEM, .direction = DMA_DEV_TO_MEM,
}; };
......
...@@ -1612,7 +1612,7 @@ static int max98088_dai2_digital_mute(struct snd_soc_dai *codec_dai, int mute) ...@@ -1612,7 +1612,7 @@ static int max98088_dai2_digital_mute(struct snd_soc_dai *codec_dai, int mute)
static void max98088_sync_cache(struct snd_soc_codec *codec) static void max98088_sync_cache(struct snd_soc_codec *codec)
{ {
u16 *reg_cache = codec->reg_cache; u8 *reg_cache = codec->reg_cache;
int i; int i;
if (!codec->cache_sync) if (!codec->cache_sync)
......
...@@ -1527,6 +1527,9 @@ static int sgtl5000_i2c_probe(struct i2c_client *client, ...@@ -1527,6 +1527,9 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,
if (IS_ERR(sgtl5000->mclk)) { if (IS_ERR(sgtl5000->mclk)) {
ret = PTR_ERR(sgtl5000->mclk); ret = PTR_ERR(sgtl5000->mclk);
dev_err(&client->dev, "Failed to get mclock: %d\n", ret); dev_err(&client->dev, "Failed to get mclock: %d\n", ret);
/* Defer the probe to see if the clk will be provided later */
if (ret == -ENOENT)
return -EPROBE_DEFER;
return ret; return ret;
} }
......
...@@ -3908,10 +3908,8 @@ int snd_soc_add_platform(struct device *dev, struct snd_soc_platform *platform, ...@@ -3908,10 +3908,8 @@ int snd_soc_add_platform(struct device *dev, struct snd_soc_platform *platform,
{ {
/* create platform component name */ /* create platform component name */
platform->name = fmt_single_name(dev, &platform->id); platform->name = fmt_single_name(dev, &platform->id);
if (platform->name == NULL) { if (platform->name == NULL)
kfree(platform);
return -ENOMEM; return -ENOMEM;
}
platform->dev = dev; platform->dev = dev;
platform->driver = platform_drv; platform->driver = platform_drv;
......
...@@ -389,9 +389,9 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) ...@@ -389,9 +389,9 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
ac97->capture_dma_data.slave_id = of_dma[1]; ac97->capture_dma_data.slave_id = of_dma[1];
ac97->playback_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_TX1; ac97->playback_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_TX1;
ac97->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; ac97->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
ac97->capture_dma_data.maxburst = 4; ac97->playback_dma_data.maxburst = 4;
ac97->capture_dma_data.slave_id = of_dma[0]; ac97->playback_dma_data.slave_id = of_dma[1];
ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev); ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev);
if (ret) if (ret)
......
...@@ -323,8 +323,8 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev) ...@@ -323,8 +323,8 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev)
} }
spdif->playback_dma_data.addr = mem->start + TEGRA20_SPDIF_DATA_OUT; spdif->playback_dma_data.addr = mem->start + TEGRA20_SPDIF_DATA_OUT;
spdif->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; spdif->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
spdif->capture_dma_data.maxburst = 4; spdif->playback_dma_data.maxburst = 4;
spdif->playback_dma_data.slave_id = dmareq->start; spdif->playback_dma_data.slave_id = dmareq->start;
pm_runtime_enable(&pdev->dev); pm_runtime_enable(&pdev->dev);
......
...@@ -543,7 +543,7 @@ static snd_pcm_uframes_t usb6fire_pcm_pointer( ...@@ -543,7 +543,7 @@ static snd_pcm_uframes_t usb6fire_pcm_pointer(
snd_pcm_uframes_t ret; snd_pcm_uframes_t ret;
if (rt->panic || !sub) if (rt->panic || !sub)
return SNDRV_PCM_STATE_XRUN; return SNDRV_PCM_POS_XRUN;
spin_lock_irqsave(&sub->lock, flags); spin_lock_irqsave(&sub->lock, flags);
ret = sub->dma_off; ret = sub->dma_off;
......
...@@ -503,7 +503,7 @@ static snd_pcm_uframes_t hiface_pcm_pointer(struct snd_pcm_substream *alsa_sub) ...@@ -503,7 +503,7 @@ static snd_pcm_uframes_t hiface_pcm_pointer(struct snd_pcm_substream *alsa_sub)
snd_pcm_uframes_t dma_offset; snd_pcm_uframes_t dma_offset;
if (rt->panic || !sub) if (rt->panic || !sub)
return SNDRV_PCM_STATE_XRUN; return SNDRV_PCM_POS_XRUN;
spin_lock_irqsave(&sub->lock, flags); spin_lock_irqsave(&sub->lock, flags);
dma_offset = sub->dma_off; dma_offset = sub->dma_off;
......
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