ASoC: ak4642: Replace mdelay function to msleep
diff mbox

Message ID 87bmw6x7ih.wl%kuninori.morimoto.gx@renesas.com
State New
Headers show

Commit Message

Kuninori Morimoto Dec. 21, 2016, 3:55 a.m. UTC
From: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>

Replace mdelay to msleep to avoid busy loop on ak4642_lout_event().
Otherwise, sometimes playback doesn't work correctly when pulseaudio
was used.

Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
---
 sound/soc/codecs/ak4642.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown Dec. 31, 2016, 6:52 p.m. UTC | #1
On Wed, Dec 21, 2016 at 03:55:11AM +0000, Kuninori Morimoto wrote:
> From: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
> 
> Replace mdelay to msleep to avoid busy loop on ak4642_lout_event().
> Otherwise, sometimes playback doesn't work correctly when pulseaudio
> was used.
> 
> Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
> ---

I can't do anything with this without a signoff from you Morimoto-san as
it is required for licensing reasons, please see SubmittingPatches for
full details.
Kuninori Morimoto Jan. 10, 2017, 2:12 a.m. UTC | #2
Hi Mark

> > From: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
> > 
> > Replace mdelay to msleep to avoid busy loop on ak4642_lout_event().
> > Otherwise, sometimes playback doesn't work correctly when pulseaudio
> > was used.
> > 
> > Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
> > ---
> 
> I can't do anything with this without a signoff from you Morimoto-san as
> it is required for licensing reasons, please see SubmittingPatches for
> full details.

Oops, thank you for pointing it.
I will re-post it soon

Patch
diff mbox

diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index 40500cd..0205ae1 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -186,7 +186,7 @@  static int ak4642_lout_event(struct snd_soc_dapm_widget *w,
 		break;
 	case SND_SOC_DAPM_POST_PMU:	/* after widget power up */
 		/* Power save mode OFF */
-		mdelay(popup_wait);
+		msleep(popup_wait);
 		snd_soc_update_bits(codec, SG_SL2, LOPS, 0);
 		break;
 	case SND_SOC_DAPM_PRE_PMD:	/* before widget power down */