Skip to content

Commit

Permalink
Merge tag 'asoc-v4.1-rc1' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/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.
  • Loading branch information
tiwai committed Apr 30, 2015
2 parents 7241ea5 + d839c98 commit 0ae3aba
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 14 deletions.
2 changes: 1 addition & 1 deletion include/sound/designware_i2s.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* 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
* it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion include/sound/soc-dapm.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ struct device;
.access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_READWRITE,\
.tlv.p = (tlv_array), \
.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) \
SOC_DAPM_SINGLE(xname, SND_SOC_NOPM, 0, max, 0, tlv_array)
#define SOC_DAPM_ENUM(xname, xenum) \
Expand Down
12 changes: 12 additions & 0 deletions include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_unregister_card(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_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_register_platform(struct device *dev,
const struct snd_soc_platform_driver *platform_drv);
Expand Down
2 changes: 1 addition & 1 deletion include/sound/spear_dma.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* 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
* it under the terms of the GNU General Public License as published by
Expand Down
13 changes: 12 additions & 1 deletion sound/soc/codecs/rt5645.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/gpio.h>
#include <linux/acpi.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
Expand Down Expand Up @@ -2656,6 +2657,15 @@ static const struct i2c_device_id 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,
const struct i2c_device_id *id)
{
Expand Down Expand Up @@ -2770,7 +2780,7 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,

case RT5645_DMIC_DATA_GPIO12:
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,
RT5645_GP12_PIN_MASK,
RT5645_GP12_PIN_DMIC2_SDA);
Expand Down Expand Up @@ -2872,6 +2882,7 @@ static struct i2c_driver rt5645_i2c_driver = {
.driver = {
.name = "rt5645",
.owner = THIS_MODULE,
.acpi_match_table = ACPI_PTR(rt5645_acpi_match),
},
.probe = rt5645_i2c_probe,
.remove = rt5645_i2c_remove,
Expand Down
5 changes: 4 additions & 1 deletion sound/soc/codecs/rt5677.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ static const struct reg_default init_list[] = {
{RT5677_PR_BASE + 0x1e, 0x0000},
{RT5677_PR_BASE + 0x12, 0x0eaa},
{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)

Expand Down Expand Up @@ -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 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)
dev_err(codec->dev, "Failed to set DMIC clock\n");
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/tfa9879.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ static int tfa9879_i2c_probe(struct i2c_client *i2c,
int i;

tfa9879 = devm_kzalloc(&i2c->dev, sizeof(*tfa9879), GFP_KERNEL);
if (IS_ERR(tfa9879))
return PTR_ERR(tfa9879);
if (!tfa9879)
return -ENOMEM;

i2c_set_clientdata(i2c, tfa9879);

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/fsl/fsl_ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
}

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);
return ssi_private->irq;
}
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ obj-$(CONFIG_SND_SOC_INTEL_SST) += common/
# Platform Support
obj-$(CONFIG_SND_SOC_INTEL_HASWELL) += haswell/
obj-$(CONFIG_SND_SOC_INTEL_BAYTRAIL) += baytrail/
obj-$(CONFIG_SND_SOC_INTEL_BAYTRAIL) += atom/
obj-$(CONFIG_SND_SST_MFLD_PLATFORM) += atom/

# Machine support
obj-$(CONFIG_SND_SOC_INTEL_SST) += boards/
1 change: 0 additions & 1 deletion sound/soc/intel/baytrail/sst-baytrail-ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,6 @@ int sst_byt_dsp_init(struct device *dev, struct sst_pdata *pdata)
dsp_new_err:
sst_ipc_fini(ipc);
ipc_init_err:
kfree(byt);

return err;
}
Expand Down
1 change: 0 additions & 1 deletion sound/soc/intel/haswell/sst-haswell-ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2201,7 +2201,6 @@ int sst_hsw_dsp_init(struct device *dev, struct sst_pdata *pdata)
dsp_new_err:
sst_ipc_fini(ipc);
ipc_init_err:
kfree(hsw);
return ret;
}
EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/qcom/lpass-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static int lpass_cpu_daiops_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{
struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai);
int ret;
int ret = -EINVAL;

switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/samsung/s3c24xx-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ static int s3c24xx_iis_dev_probe(struct platform_device *pdev)
return -ENOENT;
}
s3c24xx_i2s.regs = devm_ioremap_resource(&pdev->dev, res);
if (s3c24xx_i2s.regs == NULL)
return -ENXIO;
if (IS_ERR(s3c24xx_i2s.regs))
return PTR_ERR(s3c24xx_i2s.regs);

s3c24xx_i2s_pcm_stereo_out.dma_addr = res->start + S3C2410_IISFIFO;
s3c24xx_i2s_pcm_stereo_in.dma_addr = res->start + S3C2410_IISFIFO;
Expand Down
1 change: 1 addition & 0 deletions sound/soc/sh/rcar/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ static int rsnd_dmaen_init(struct rsnd_priv *priv, struct rsnd_dma *dma, int id,
(void *)id);
}
if (IS_ERR_OR_NULL(dmaen->chan)) {
dmaen->chan = NULL;
dev_err(dev, "can't get dma channel\n");
goto rsnd_dma_channel_err;
}
Expand Down

0 comments on commit 0ae3aba

Please sign in to comment.