aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorJarkko Nikula <jhnikula@gmail.com>2010-11-05 14:35:21 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-06 11:28:35 -0400
commit3a45b8672d3f8542e430e7a5c7366ec9bdded054 (patch)
treee15feaaddb1f81727c0e9c0af3a9b5d642b96684 /sound/soc/soc-core.c
parentd6ce4cf3967dca78f967cd0bf70b175084885f40 (diff)
ASoC: Move pop time from DAPM context to sound card
Based on discussion the dapm_pop_time in debugsfs should be per card rather than per device. Single pop time value for entire card is cleaner when the DAPM sequencing is extended to cross-device paths. debugfs/asoc/{card->name}/{codec dir}/dapm_pop_time -> debugfs/asoc/{card->name}/dapm_pop_time Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 57e5d7bfb130..f030521c48d1 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -255,13 +255,6 @@ static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
255 printk(KERN_WARNING 255 printk(KERN_WARNING
256 "ASoC: Failed to create codec register debugfs file\n"); 256 "ASoC: Failed to create codec register debugfs file\n");
257 257
258 codec->debugfs_pop_time = debugfs_create_u32("dapm_pop_time", 0644,
259 codec->debugfs_codec_root,
260 &codec->dapm.pop_time);
261 if (!codec->debugfs_pop_time)
262 printk(KERN_WARNING
263 "Failed to create pop time debugfs file\n");
264
265 codec->dapm.debugfs_dapm = debugfs_create_dir("dapm", 258 codec->dapm.debugfs_dapm = debugfs_create_dir("dapm",
266 codec->debugfs_codec_root); 259 codec->debugfs_codec_root);
267 if (!codec->dapm.debugfs_dapm) 260 if (!codec->dapm.debugfs_dapm)
@@ -380,9 +373,18 @@ static void soc_init_card_debugfs(struct snd_soc_card *card)
380{ 373{
381 card->debugfs_card_root = debugfs_create_dir(card->name, 374 card->debugfs_card_root = debugfs_create_dir(card->name,
382 debugfs_root); 375 debugfs_root);
383 if (!card->debugfs_card_root) 376 if (!card->debugfs_card_root) {
384 dev_warn(card->dev, 377 dev_warn(card->dev,
385 "ASoC: Failed to create codec debugfs directory\n"); 378 "ASoC: Failed to create codec debugfs directory\n");
379 return;
380 }
381
382 card->debugfs_pop_time = debugfs_create_u32("dapm_pop_time", 0644,
383 card->debugfs_card_root,
384 &card->pop_time);
385 if (!card->debugfs_pop_time)
386 dev_warn(card->dev,
387 "Failed to create pop time debugfs file\n");
386} 388}
387 389
388static void soc_cleanup_card_debugfs(struct snd_soc_card *card) 390static void soc_cleanup_card_debugfs(struct snd_soc_card *card)
@@ -1426,6 +1428,7 @@ static int soc_probe_dai_link(struct snd_soc_card *card, int num)
1426 1428
1427 /* probe the CODEC */ 1429 /* probe the CODEC */
1428 if (!codec->probed) { 1430 if (!codec->probed) {
1431 codec->dapm.card = card;
1429 if (codec->driver->probe) { 1432 if (codec->driver->probe) {
1430 ret = codec->driver->probe(codec); 1433 ret = codec->driver->probe(codec);
1431 if (ret < 0) { 1434 if (ret < 0) {