summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown2014-03-06 10:07:39 +0100
committerMark Brown2014-03-06 10:07:39 +0100
commit6af5263ceaffc9d4403592dc81cd3b197702dc69 (patch)
tree4c144be49e1ade130571d0169e259e9966177962 /sound/soc/soc-core.c
parentASoC: dapm: Break dapm_set_path_status() appart (diff)
parentASoC: Move ignore_pmdown_time from CODEC to component (diff)
downloadkernel-qcow2-linux-6af5263ceaffc9d4403592dc81cd3b197702dc69.tar.gz
kernel-qcow2-linux-6af5263ceaffc9d4403592dc81cd3b197702dc69.tar.xz
kernel-qcow2-linux-6af5263ceaffc9d4403592dc81cd3b197702dc69.zip
Merge branch 'topic/pcm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-enum
Conflicts: include/sound/soc.h
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 2ddc7a4939d2..1fa7dda2e2bf 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3869,11 +3869,13 @@ static inline char *fmt_multiple_name(struct device *dev,
/**
* snd_soc_register_dai - Register a DAI with the ASoC core
*
- * @dai: DAI to register
+ * @component: The component the DAIs are registered for
+ * @dai_drv: DAI driver to use for the DAIs
*/
-static int snd_soc_register_dai(struct device *dev,
+static int snd_soc_register_dai(struct snd_soc_component *component,
struct snd_soc_dai_driver *dai_drv)
{
+ struct device *dev = component->dev;
struct snd_soc_codec *codec;
struct snd_soc_dai *dai;
@@ -3890,6 +3892,7 @@ static int snd_soc_register_dai(struct device *dev,
return -ENOMEM;
}
+ dai->component = component;
dai->dev = dev;
dai->driver = dai_drv;
dai->dapm.dev = dev;
@@ -3947,12 +3950,14 @@ found:
/**
* snd_soc_register_dais - Register multiple DAIs with the ASoC core
*
- * @dai: Array of DAIs to register
+ * @component: The component the DAIs are registered for
+ * @dai_drv: DAI driver to use for the DAIs
* @count: Number of DAIs
*/
-static int snd_soc_register_dais(struct device *dev,
+static int snd_soc_register_dais(struct snd_soc_component *component,
struct snd_soc_dai_driver *dai_drv, size_t count)
{
+ struct device *dev = component->dev;
struct snd_soc_codec *codec;
struct snd_soc_dai *dai;
int i, ret = 0;
@@ -3975,6 +3980,7 @@ static int snd_soc_register_dais(struct device *dev,
goto err;
}
+ dai->component = component;
dai->dev = dev;
dai->driver = &dai_drv[i];
if (dai->driver->id)
@@ -4071,9 +4077,9 @@ __snd_soc_register_component(struct device *dev,
* since it had been used snd_soc_register_dais(),
*/
if ((1 == num_dai) && allow_single_dai)
- ret = snd_soc_register_dai(dev, dai_drv);
+ ret = snd_soc_register_dai(cmpnt, dai_drv);
else
- ret = snd_soc_register_dais(dev, dai_drv, num_dai);
+ ret = snd_soc_register_dais(cmpnt, dai_drv, num_dai);
if (ret < 0) {
dev_err(dev, "ASoC: Failed to regster DAIs: %d\n", ret);
goto error_component_name;
@@ -4106,6 +4112,8 @@ int snd_soc_register_component(struct device *dev,
return -ENOMEM;
}
+ cmpnt->ignore_pmdown_time = true;
+
return __snd_soc_register_component(dev, cmpnt, cmpnt_drv,
dai_drv, num_dai, true);
}
@@ -4304,7 +4312,7 @@ int snd_soc_register_codec(struct device *dev,
codec->volatile_register = codec_drv->volatile_register;
codec->readable_register = codec_drv->readable_register;
codec->writable_register = codec_drv->writable_register;
- codec->ignore_pmdown_time = codec_drv->ignore_pmdown_time;
+ codec->component.ignore_pmdown_time = codec_drv->ignore_pmdown_time;
codec->dapm.bias_level = SND_SOC_BIAS_OFF;
codec->dapm.dev = dev;
codec->dapm.codec = codec;