From 85488037bb9b533b064be66412dbe1dbcd2734d9 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sat, 5 Sep 2009 18:52:16 +0100 Subject: ASoC: Add source argument to PLL configuration More and more devices feature PLLs and FLLs with the ability to select between multiple input clocks. In order to better support these devices a new argument, source, has been added to the set_pll() configuration API. Using set_clkdiv() is often difficult due to the need to stop the PLL/FLL before any reconfiguration can be done. Signed-off-by: Mark Brown --- sound/soc/codecs/wm9713.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/soc/codecs/wm9713.c') diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index abed37a..ca3d449 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c @@ -800,8 +800,8 @@ static int wm9713_set_pll(struct snd_soc_codec *codec, return 0; } -static int wm9713_set_dai_pll(struct snd_soc_dai *codec_dai, - int pll_id, unsigned int freq_in, unsigned int freq_out) +static int wm9713_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, + int source, unsigned int freq_in, unsigned int freq_out) { struct snd_soc_codec *codec = codec_dai->codec; return wm9713_set_pll(codec, pll_id, freq_in, freq_out); -- cgit v1.1 From fe3e78e073d25308756f38019956061153267769 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 3 Nov 2009 22:13:13 +0000 Subject: ASoC: Factor out snd_soc_init_card() snd_soc_init_card() is always called as the last part of the CODEC probe function so we can factor it out into the core card setup rather than have each CODEC replicate the code to do the initialiastation. This will be required to support multiple CODECs per card. Signed-off-by: Mark Brown --- sound/soc/codecs/wm9713.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sound/soc/codecs/wm9713.c') diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index ca3d449..5f81ecd 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c @@ -1247,13 +1247,8 @@ static int wm9713_soc_probe(struct platform_device *pdev) snd_soc_add_controls(codec, wm9713_snd_ac97_controls, ARRAY_SIZE(wm9713_snd_ac97_controls)); wm9713_add_widgets(codec); - ret = snd_soc_init_card(socdev); - if (ret < 0) - goto reset_err; - return 0; -reset_err: - snd_soc_free_pcms(socdev); + return 0; pcm_err: snd_soc_free_ac97_codec(codec); -- cgit v1.1 From 0a3f5e35aae43b20fef09fd800cf52cc9a2d61a8 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 12 Nov 2009 23:15:08 +0000 Subject: ASoC: Remove redundant snd_soc_dapm_new_widgets() calls The DAPM widgets are now insntantiated by the core when creating the card so there is no need for the individual CODEC drivers to do so. Signed-off-by: Mark Brown --- sound/soc/codecs/wm9713.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sound/soc/codecs/wm9713.c') diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 5f81ecd..00bac31 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c @@ -625,7 +625,6 @@ static int wm9713_add_widgets(struct snd_soc_codec *codec) snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); - snd_soc_dapm_new_widgets(codec); return 0; } -- cgit v1.1 From a22eaf4ce106404f6c5283da30b4d514ede964c1 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 27 Nov 2009 15:14:09 +0100 Subject: ASoC: Revert missing reset_err in wm97*.c The commit fe3e78e073d25308756f38019956061153267769 ASoC: Factor out snd_soc_init_card() removed the error paths that are still valid for wm97* codecs, causing the compile errors like sound/soc/codecs/wm9705.c:399: error: label 'reset_err' used but not defined sound/soc/codecs/wm9712.c:687: error: label 'reset_err' used but not defined sound/soc/codecs/wm9713.c:1237: error: label 'reset_err' used but not defined Revert the removed error path codes. Signed-off-by: Takashi Iwai --- sound/soc/codecs/wm9713.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/soc/codecs/wm9713.c') diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 00bac31..4d74ecb 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c @@ -1249,6 +1249,8 @@ static int wm9713_soc_probe(struct platform_device *pdev) return 0; +reset_err: + snd_soc_free_pcms(socdev); pcm_err: snd_soc_free_ac97_codec(codec); -- cgit v1.1