From 444fc4b369f9341d2cbcffe2d1ffde4cad5b4945 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 19 Jul 2013 10:22:21 -0300 Subject: ASoC: wm8962: Do not call configure_bclk() inside wm8962_set_dai_sysclk() Currently after playing any audio file, we get the following error message: $ aplay clarinet.wav Playing WAVE 'clarinet.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo $ wm8962 0-001a: Unsupported sysclk ratio 544 This error message appears about 5 seconds after the audio playback has finished. Quoting Mark Brown [1]: "The issue here is triggered by the machine switching from the FLL to direct MCLK usage where the MCLK isn't generating a useful ratio. I suspect we should just kill the configure_bclk() in set_sysclk(), that one isn't safe as we can't reconfigure a live SYSCLK and it's probably the one that generates your warnings." Confirmed that the "Unsupported sysclk ratio" error message comes from wm8962_set_dai_sysclk(), so get rid of wm8962_configure_bclk() inside this function. [1] http://mailman.alsa-project.org/pipermail/alsa-devel/2013-July/064241.html Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown --- sound/soc/codecs/wm8962.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sound/soc') diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index e2de9ec..8b8905d 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -2621,8 +2621,6 @@ static int wm8962_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, wm8962->sysclk_rate = freq; - wm8962_configure_bclk(codec); - return 0; } -- cgit v1.1 From da72c9619f4df033d431a0a4cee715cf14c78433 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 18 Jul 2013 22:46:46 +0100 Subject: ASoC: wm8962: Use power efficient workqueue The accessory detect debounce work is not performance sensitive so let the scheduler run it wherever is most efficient rather than in a per CPU workqueue by using the system power efficient workqueue. Signed-off-by: Mark Brown Acked-by: Viresh Kumar --- sound/soc/codecs/wm8962.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sound/soc') diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 8b8905d..36782f0 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -3044,8 +3044,9 @@ static irqreturn_t wm8962_irq(int irq, void *data) pm_wakeup_event(dev, 300); - schedule_delayed_work(&wm8962->mic_work, - msecs_to_jiffies(250)); + queue_delayed_work(system_power_efficient_wq, + &wm8962->mic_work, + msecs_to_jiffies(250)); } return IRQ_HANDLED; -- cgit v1.1