diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-26 14:25:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-26 14:25:25 -0400 |
commit | 8f074a557104aed6f7b0a0913227039481da3449 (patch) | |
tree | 0876c1c94dfc705567628ea3f99962bdfa7a8da8 | |
parent | 6c4155a9cd6bd07d3cb70ca5eeb6f2751de0931c (diff) | |
parent | 43cbd286fbba4bfb0c2ef05dc62522dfd5a2c000 (diff) |
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.
-rw-r--r-- | drivers/misc/atmel-ssc.c | 11 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 13 | ||||
-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/soc-core.c | 4 | ||||
-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/pcm.c | 2 | ||||
-rw-r--r-- | sound/usb/hiface/pcm.c | 2 |
10 files changed, 29 insertions, 22 deletions
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index f7b90661e321..e068a76a5f6f 100644 --- a/drivers/misc/atmel-ssc.c +++ b/drivers/misc/atmel-ssc.c | |||
@@ -66,14 +66,19 @@ EXPORT_SYMBOL(ssc_request); | |||
66 | 66 | ||
67 | void ssc_free(struct ssc_device *ssc) | 67 | void ssc_free(struct ssc_device *ssc) |
68 | { | 68 | { |
69 | bool disable_clk = true; | ||
70 | |||
69 | spin_lock(&user_lock); | 71 | spin_lock(&user_lock); |
70 | if (ssc->user) { | 72 | if (ssc->user) |
71 | ssc->user--; | 73 | ssc->user--; |
72 | clk_disable_unprepare(ssc->clk); | 74 | else { |
73 | } else { | 75 | disable_clk = false; |
74 | dev_dbg(&ssc->pdev->dev, "device already free\n"); | 76 | dev_dbg(&ssc->pdev->dev, "device already free\n"); |
75 | } | 77 | } |
76 | spin_unlock(&user_lock); | 78 | spin_unlock(&user_lock); |
79 | |||
80 | if (disable_clk) | ||
81 | clk_disable_unprepare(ssc->clk); | ||
77 | } | 82 | } |
78 | EXPORT_SYMBOL(ssc_free); | 83 | EXPORT_SYMBOL(ssc_free); |
79 | 84 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index e2f83591161b..92b9b4324372 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 | ||
@@ -3231,7 +3233,7 @@ static const struct hda_fixup stac927x_fixups[] = { | |||
3231 | /* configure the analog microphone on some laptops */ | 3233 | /* configure the analog microphone on some laptops */ |
3232 | { 0x0c, 0x90a79130 }, | 3234 | { 0x0c, 0x90a79130 }, |
3233 | /* correct the front output jack as a hp out */ | 3235 | /* correct the front output jack as a hp out */ |
3234 | { 0x0f, 0x0227011f }, | 3236 | { 0x0f, 0x0221101f }, |
3235 | /* correct the front input jack as a mic */ | 3237 | /* correct the front input jack as a mic */ |
3236 | { 0x0e, 0x02a79130 }, | 3238 | { 0x0e, 0x02a79130 }, |
3237 | {} | 3239 | {} |
@@ -3612,20 +3614,18 @@ static int stac_parse_auto_config(struct hda_codec *codec) | |||
3612 | static int stac_init(struct hda_codec *codec) | 3614 | static int stac_init(struct hda_codec *codec) |
3613 | { | 3615 | { |
3614 | struct sigmatel_spec *spec = codec->spec; | 3616 | struct sigmatel_spec *spec = codec->spec; |
3615 | unsigned int gpio; | ||
3616 | int i; | 3617 | int i; |
3617 | 3618 | ||
3618 | /* override some hints */ | 3619 | /* override some hints */ |
3619 | stac_store_hints(codec); | 3620 | stac_store_hints(codec); |
3620 | 3621 | ||
3621 | /* set up GPIO */ | 3622 | /* set up GPIO */ |
3622 | gpio = spec->gpio_data; | ||
3623 | /* turn on EAPD statically when spec->eapd_switch isn't set. | 3623 | /* turn on EAPD statically when spec->eapd_switch isn't set. |
3624 | * otherwise, unsol event will turn it on/off dynamically | 3624 | * otherwise, unsol event will turn it on/off dynamically |
3625 | */ | 3625 | */ |
3626 | if (!spec->eapd_switch) | 3626 | if (!spec->eapd_switch) |
3627 | gpio |= spec->eapd_mask; | 3627 | spec->gpio_data |= spec->eapd_mask; |
3628 | stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, gpio); | 3628 | stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, spec->gpio_data); |
3629 | 3629 | ||
3630 | snd_hda_gen_init(codec); | 3630 | snd_hda_gen_init(codec); |
3631 | 3631 | ||
@@ -3915,6 +3915,7 @@ static void stac_setup_gpio(struct hda_codec *codec) | |||
3915 | { | 3915 | { |
3916 | struct sigmatel_spec *spec = codec->spec; | 3916 | struct sigmatel_spec *spec = codec->spec; |
3917 | 3917 | ||
3918 | spec->gpio_mask |= spec->eapd_mask; | ||
3918 | if (spec->gpio_led) { | 3919 | if (spec->gpio_led) { |
3919 | if (!spec->vref_mute_led_nid) { | 3920 | if (!spec->vref_mute_led_nid) { |
3920 | spec->gpio_mask |= spec->gpio_led; | 3921 | spec->gpio_mask |= spec->gpio_led; |
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/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/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/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/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; |