diff options
author | Mark Brown <broonie@linaro.org> | 2014-03-10 12:17:48 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-10 12:17:48 +0000 |
commit | a707d030da09793956a339066f0c91deafef14a3 (patch) | |
tree | 19e3d4512672e05a42c5a72d570dddce2eaec7f6 /sound/soc/soc-core.c | |
parent | a1a564ed6abf62e05fcffa9ed3f46a826400df3a (diff) | |
parent | 3d59400fe47e7e8bfb024cd1651433bef42e268e (diff) | |
download | op-kernel-dev-a707d030da09793956a339066f0c91deafef14a3.zip op-kernel-dev-a707d030da09793956a339066f0c91deafef14a3.tar.gz |
Merge branch 'topic/pcm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 9d25c2e..255eca9 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3908,11 +3908,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; @@ -3929,6 +3931,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; @@ -3986,12 +3989,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; @@ -4014,6 +4019,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) @@ -4110,9 +4116,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; @@ -4145,6 +4151,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); } @@ -4343,7 +4351,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; |