Commit 0ae3aba2 authored by Takashi Iwai's avatar Takashi Iwai

Merge tag 'asoc-v4.1-rc1' of...

Merge tag 'asoc-v4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.1

A few fixes for v4.1, none earth shattering and mostly driver related
except for one change to fix !PM builds for Intel platforms which is
done by adding stubs in the core so other platforms don't run into the
same issue.
parents 7241ea55 d839c98f
/* /*
* Copyright (ST) 2012 Rajeev Kumar (rajeev-dlh.kumar@st.com) * Copyright (ST) 2012 Rajeev Kumar (rajeevkumar.linux@gmail.com)
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
......
...@@ -287,7 +287,7 @@ struct device; ...@@ -287,7 +287,7 @@ struct device;
.access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_READWRITE,\ .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_READWRITE,\
.tlv.p = (tlv_array), \ .tlv.p = (tlv_array), \
.get = snd_soc_dapm_get_volsw, .put = snd_soc_dapm_put_volsw, \ .get = snd_soc_dapm_get_volsw, .put = snd_soc_dapm_put_volsw, \
.private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 0) } .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 1) }
#define SOC_DAPM_SINGLE_TLV_VIRT(xname, max, tlv_array) \ #define SOC_DAPM_SINGLE_TLV_VIRT(xname, max, tlv_array) \
SOC_DAPM_SINGLE(xname, SND_SOC_NOPM, 0, max, 0, tlv_array) SOC_DAPM_SINGLE(xname, SND_SOC_NOPM, 0, max, 0, tlv_array)
#define SOC_DAPM_ENUM(xname, xenum) \ #define SOC_DAPM_ENUM(xname, xenum) \
......
...@@ -387,8 +387,20 @@ int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source, ...@@ -387,8 +387,20 @@ int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
int snd_soc_register_card(struct snd_soc_card *card); int snd_soc_register_card(struct snd_soc_card *card);
int snd_soc_unregister_card(struct snd_soc_card *card); int snd_soc_unregister_card(struct snd_soc_card *card);
int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card); int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card);
#ifdef CONFIG_PM_SLEEP
int snd_soc_suspend(struct device *dev); int snd_soc_suspend(struct device *dev);
int snd_soc_resume(struct device *dev); int snd_soc_resume(struct device *dev);
#else
static inline int snd_soc_suspend(struct device *dev)
{
return 0;
}
static inline int snd_soc_resume(struct device *dev)
{
return 0;
}
#endif
int snd_soc_poweroff(struct device *dev); int snd_soc_poweroff(struct device *dev);
int snd_soc_register_platform(struct device *dev, int snd_soc_register_platform(struct device *dev,
const struct snd_soc_platform_driver *platform_drv); const struct snd_soc_platform_driver *platform_drv);
......
/* /*
* linux/spear_dma.h * linux/spear_dma.h
* *
* Copyright (ST) 2012 Rajeev Kumar (rajeev-dlh.kumar@st.com) * Copyright (ST) 2012 Rajeev Kumar (rajeevkumar.linux@gmail.com)
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/acpi.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/pcm.h> #include <sound/pcm.h>
#include <sound/pcm_params.h> #include <sound/pcm_params.h>
...@@ -2656,6 +2657,15 @@ static const struct i2c_device_id rt5645_i2c_id[] = { ...@@ -2656,6 +2657,15 @@ static const struct i2c_device_id rt5645_i2c_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, rt5645_i2c_id); MODULE_DEVICE_TABLE(i2c, rt5645_i2c_id);
#ifdef CONFIG_ACPI
static struct acpi_device_id rt5645_acpi_match[] = {
{ "10EC5645", 0 },
{ "10EC5650", 0 },
{},
};
MODULE_DEVICE_TABLE(acpi, rt5645_acpi_match);
#endif
static int rt5645_i2c_probe(struct i2c_client *i2c, static int rt5645_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id) const struct i2c_device_id *id)
{ {
...@@ -2770,7 +2780,7 @@ static int rt5645_i2c_probe(struct i2c_client *i2c, ...@@ -2770,7 +2780,7 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
case RT5645_DMIC_DATA_GPIO12: case RT5645_DMIC_DATA_GPIO12:
regmap_update_bits(rt5645->regmap, RT5645_DMIC_CTRL1, regmap_update_bits(rt5645->regmap, RT5645_DMIC_CTRL1,
RT5645_DMIC_1_DP_MASK, RT5645_DMIC_2_DP_GPIO12); RT5645_DMIC_2_DP_MASK, RT5645_DMIC_2_DP_GPIO12);
regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1, regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1,
RT5645_GP12_PIN_MASK, RT5645_GP12_PIN_MASK,
RT5645_GP12_PIN_DMIC2_SDA); RT5645_GP12_PIN_DMIC2_SDA);
...@@ -2872,6 +2882,7 @@ static struct i2c_driver rt5645_i2c_driver = { ...@@ -2872,6 +2882,7 @@ static struct i2c_driver rt5645_i2c_driver = {
.driver = { .driver = {
.name = "rt5645", .name = "rt5645",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.acpi_match_table = ACPI_PTR(rt5645_acpi_match),
}, },
.probe = rt5645_i2c_probe, .probe = rt5645_i2c_probe,
.remove = rt5645_i2c_remove, .remove = rt5645_i2c_remove,
......
...@@ -62,6 +62,9 @@ static const struct reg_default init_list[] = { ...@@ -62,6 +62,9 @@ static const struct reg_default init_list[] = {
{RT5677_PR_BASE + 0x1e, 0x0000}, {RT5677_PR_BASE + 0x1e, 0x0000},
{RT5677_PR_BASE + 0x12, 0x0eaa}, {RT5677_PR_BASE + 0x12, 0x0eaa},
{RT5677_PR_BASE + 0x14, 0x018a}, {RT5677_PR_BASE + 0x14, 0x018a},
{RT5677_PR_BASE + 0x15, 0x0490},
{RT5677_PR_BASE + 0x38, 0x0f71},
{RT5677_PR_BASE + 0x39, 0x0f71},
}; };
#define RT5677_INIT_REG_LEN ARRAY_SIZE(init_list) #define RT5677_INIT_REG_LEN ARRAY_SIZE(init_list)
...@@ -914,7 +917,7 @@ static int set_dmic_clk(struct snd_soc_dapm_widget *w, ...@@ -914,7 +917,7 @@ static int set_dmic_clk(struct snd_soc_dapm_widget *w,
{ {
struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
int idx = rl6231_calc_dmic_clk(rt5677->sysclk); int idx = rl6231_calc_dmic_clk(rt5677->lrck[RT5677_AIF1] << 8);
if (idx < 0) if (idx < 0)
dev_err(codec->dev, "Failed to set DMIC clock\n"); dev_err(codec->dev, "Failed to set DMIC clock\n");
......
...@@ -280,8 +280,8 @@ static int tfa9879_i2c_probe(struct i2c_client *i2c, ...@@ -280,8 +280,8 @@ static int tfa9879_i2c_probe(struct i2c_client *i2c,
int i; int i;
tfa9879 = devm_kzalloc(&i2c->dev, sizeof(*tfa9879), GFP_KERNEL); tfa9879 = devm_kzalloc(&i2c->dev, sizeof(*tfa9879), GFP_KERNEL);
if (IS_ERR(tfa9879)) if (!tfa9879)
return PTR_ERR(tfa9879); return -ENOMEM;
i2c_set_clientdata(i2c, tfa9879); i2c_set_clientdata(i2c, tfa9879);
......
...@@ -1357,7 +1357,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) ...@@ -1357,7 +1357,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
} }
ssi_private->irq = platform_get_irq(pdev, 0); ssi_private->irq = platform_get_irq(pdev, 0);
if (!ssi_private->irq) { if (ssi_private->irq < 0) {
dev_err(&pdev->dev, "no irq for node %s\n", pdev->name); dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
return ssi_private->irq; return ssi_private->irq;
} }
......
...@@ -4,7 +4,7 @@ obj-$(CONFIG_SND_SOC_INTEL_SST) += common/ ...@@ -4,7 +4,7 @@ obj-$(CONFIG_SND_SOC_INTEL_SST) += common/
# Platform Support # Platform Support
obj-$(CONFIG_SND_SOC_INTEL_HASWELL) += haswell/ obj-$(CONFIG_SND_SOC_INTEL_HASWELL) += haswell/
obj-$(CONFIG_SND_SOC_INTEL_BAYTRAIL) += baytrail/ obj-$(CONFIG_SND_SOC_INTEL_BAYTRAIL) += baytrail/
obj-$(CONFIG_SND_SOC_INTEL_BAYTRAIL) += atom/ obj-$(CONFIG_SND_SST_MFLD_PLATFORM) += atom/
# Machine support # Machine support
obj-$(CONFIG_SND_SOC_INTEL_SST) += boards/ obj-$(CONFIG_SND_SOC_INTEL_SST) += boards/
...@@ -759,7 +759,6 @@ int sst_byt_dsp_init(struct device *dev, struct sst_pdata *pdata) ...@@ -759,7 +759,6 @@ int sst_byt_dsp_init(struct device *dev, struct sst_pdata *pdata)
dsp_new_err: dsp_new_err:
sst_ipc_fini(ipc); sst_ipc_fini(ipc);
ipc_init_err: ipc_init_err:
kfree(byt);
return err; return err;
} }
......
...@@ -2201,7 +2201,6 @@ int sst_hsw_dsp_init(struct device *dev, struct sst_pdata *pdata) ...@@ -2201,7 +2201,6 @@ int sst_hsw_dsp_init(struct device *dev, struct sst_pdata *pdata)
dsp_new_err: dsp_new_err:
sst_ipc_fini(ipc); sst_ipc_fini(ipc);
ipc_init_err: ipc_init_err:
kfree(hsw);
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(sst_hsw_dsp_init); EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
......
...@@ -194,7 +194,7 @@ static int lpass_cpu_daiops_trigger(struct snd_pcm_substream *substream, ...@@ -194,7 +194,7 @@ static int lpass_cpu_daiops_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai) int cmd, struct snd_soc_dai *dai)
{ {
struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai); struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai);
int ret; int ret = -EINVAL;
switch (cmd) { switch (cmd) {
case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_START:
......
...@@ -461,8 +461,8 @@ static int s3c24xx_iis_dev_probe(struct platform_device *pdev) ...@@ -461,8 +461,8 @@ static int s3c24xx_iis_dev_probe(struct platform_device *pdev)
return -ENOENT; return -ENOENT;
} }
s3c24xx_i2s.regs = devm_ioremap_resource(&pdev->dev, res); s3c24xx_i2s.regs = devm_ioremap_resource(&pdev->dev, res);
if (s3c24xx_i2s.regs == NULL) if (IS_ERR(s3c24xx_i2s.regs))
return -ENXIO; return PTR_ERR(s3c24xx_i2s.regs);
s3c24xx_i2s_pcm_stereo_out.dma_addr = res->start + S3C2410_IISFIFO; s3c24xx_i2s_pcm_stereo_out.dma_addr = res->start + S3C2410_IISFIFO;
s3c24xx_i2s_pcm_stereo_in.dma_addr = res->start + S3C2410_IISFIFO; s3c24xx_i2s_pcm_stereo_in.dma_addr = res->start + S3C2410_IISFIFO;
......
...@@ -156,6 +156,7 @@ static int rsnd_dmaen_init(struct rsnd_priv *priv, struct rsnd_dma *dma, int id, ...@@ -156,6 +156,7 @@ static int rsnd_dmaen_init(struct rsnd_priv *priv, struct rsnd_dma *dma, int id,
(void *)id); (void *)id);
} }
if (IS_ERR_OR_NULL(dmaen->chan)) { if (IS_ERR_OR_NULL(dmaen->chan)) {
dmaen->chan = NULL;
dev_err(dev, "can't get dma channel\n"); dev_err(dev, "can't get dma channel\n");
goto rsnd_dma_channel_err; goto rsnd_dma_channel_err;
} }
......
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