* Re: BUG: soft lockup when recording audio on MX28EVK with ASoC sgtl5000 [not found] <51502C87.8050902@digi.com> @ 2013-03-25 19:31 ` Fabio Estevam 2013-03-25 23:15 ` Fabio Estevam 0 siblings, 1 reply; 3+ messages in thread From: Fabio Estevam @ 2013-03-25 19:31 UTC (permalink / raw) To: Hector Palacios Cc: Marek Vasut, alsa-devel, Mark Brown, linux-kernel@vger.kernel.org, Shawn Guo, Dong Aisheng [-- Attachment #1: Type: text/plain, Size: 802 bytes --] Hi Hector, On Mon, Mar 25, 2013 at 7:52 AM, Hector Palacios <hector.palacios@digi.com> wrote: > Hello, > > I just tried recording audio on Freescale's MX28EVK that uses ASoC sgtl5000 > (kernel v3.8) with: > > arecord -M -f cd sound.wav --duration 10 > > and got a scheduler message: > > [ 789.041847] [sched_delayed] sched: RT throttling activated I have just tested arecord on 3.8,4 and I haven't seen the 'soft lockup' bug. However, I see that mxs saif gets busy after the record and any attempt to do an 'aplay' after the first arecord fails. With the attached patch applied I am able to do arecord/aplay sequence several times. I don't have a cable handy here to actually test if the sound is recorded properly or not. Could you please test it against 3.8.4? Thanks, Fabio Estevam [-- Attachment #2: 0001-Do-not-check-busy.patch --] [-- Type: application/octet-stream, Size: 2747 bytes --] From dde98beec0ffdd84d497b63923cf26e8c9b0a5c7 Mon Sep 17 00:00:00 2001 From: Fabio Estevam <fabio.estevam@freescale.com> Date: Mon, 25 Mar 2013 16:23:04 -0300 Subject: [PATCH] ASoC: mxs-saif: Do not check for BM_SAIF_STAT_BUSY Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> --- sound/soc/mxs/mxs-saif.c | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index 365d9d2..1986deb 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -207,17 +207,10 @@ static int mxs_saif_set_clk(struct mxs_saif *saif, int mxs_saif_put_mclk(unsigned int saif_id) { struct mxs_saif *saif = mxs_saif[saif_id]; - u32 stat; if (!saif) return -EINVAL; - stat = __raw_readl(saif->base + SAIF_STAT); - if (stat & BM_SAIF_STAT_BUSY) { - dev_err(saif->dev, "error: busy\n"); - return -EBUSY; - } - clk_disable_unprepare(saif->clk); /* disable MCLK output */ @@ -241,7 +234,6 @@ int mxs_saif_get_mclk(unsigned int saif_id, unsigned int mclk, unsigned int rate) { struct mxs_saif *saif = mxs_saif[saif_id]; - u32 stat; int ret; struct mxs_saif *master_saif; @@ -262,12 +254,6 @@ int mxs_saif_get_mclk(unsigned int saif_id, unsigned int mclk, return -EINVAL; } - stat = __raw_readl(saif->base + SAIF_STAT); - if (stat & BM_SAIF_STAT_BUSY) { - dev_err(saif->dev, "error: busy\n"); - return -EBUSY; - } - saif->mclk_in_use = 1; ret = mxs_saif_set_clk(saif, mclk, rate); if (ret) @@ -291,16 +277,10 @@ EXPORT_SYMBOL_GPL(mxs_saif_get_mclk); */ static int mxs_saif_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) { - u32 scr, stat; + u32 scr; u32 scr0; struct mxs_saif *saif = snd_soc_dai_get_drvdata(cpu_dai); - stat = __raw_readl(saif->base + SAIF_STAT); - if (stat & BM_SAIF_STAT_BUSY) { - dev_err(cpu_dai->dev, "error: busy\n"); - return -EBUSY; - } - scr0 = __raw_readl(saif->base + SAIF_CTRL); scr0 = scr0 & ~BM_SAIF_CTRL_BITCLK_EDGE & ~BM_SAIF_CTRL_LRCLK_POLARITY \ & ~BM_SAIF_CTRL_JUSTIFY & ~BM_SAIF_CTRL_DELAY; @@ -397,7 +377,7 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream, { struct mxs_saif *saif = snd_soc_dai_get_drvdata(cpu_dai); struct mxs_saif *master_saif; - u32 scr, stat; + u32 scr; int ret; master_saif = mxs_saif_get_master(saif); @@ -410,12 +390,6 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } - stat = __raw_readl(saif->base + SAIF_STAT); - if (stat & BM_SAIF_STAT_BUSY) { - dev_err(cpu_dai->dev, "error: busy\n"); - return -EBUSY; - } - /* * Set saif clk based on sample rate. * If mclk is used, we also set mclk, if not, saif->mclk is -- 1.7.9.5 [-- Attachment #3: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: BUG: soft lockup when recording audio on MX28EVK with ASoC sgtl5000 2013-03-25 19:31 ` BUG: soft lockup when recording audio on MX28EVK with ASoC sgtl5000 Fabio Estevam @ 2013-03-25 23:15 ` Fabio Estevam 2013-03-26 11:43 ` Hector Palacios 0 siblings, 1 reply; 3+ messages in thread From: Fabio Estevam @ 2013-03-25 23:15 UTC (permalink / raw) To: Hector Palacios Cc: linux-kernel@vger.kernel.org, Marek Vasut, alsa-devel, Shawn Guo, Dong Aisheng, Mark Brown Hector, On Mon, Mar 25, 2013 at 4:31 PM, Fabio Estevam <festevam@gmail.com> wrote: > Hi Hector, > > On Mon, Mar 25, 2013 at 7:52 AM, Hector Palacios > <hector.palacios@digi.com> wrote: >> Hello, >> >> I just tried recording audio on Freescale's MX28EVK that uses ASoC sgtl5000 >> (kernel v3.8) with: >> >> arecord -M -f cd sound.wav --duration 10 >> >> and got a scheduler message: >> >> [ 789.041847] [sched_delayed] sched: RT throttling activated > > I have just tested arecord on 3.8,4 and I haven't seen the 'soft lockup' bug. > > However, I see that mxs saif gets busy after the record and any > attempt to do an 'aplay' after the first arecord fails. > > With the attached patch applied I am able to do arecord/aplay sequence > several times. > > I don't have a cable handy here to actually test if the sound is > recorded properly or not. > > Could you please test it against 3.8.4? I managed to test arecord and it works with the following as follows: 1. Run alsamixer and select LINE_IN in the Capture element 2. Record with the following command line: arecord -D hw:0,1 -d 10 -f S16_LE -r 44100 -c test.wav 3. Then listen test.wav on your PC or in your board itself. The sequence above works fine. Anyway, I will submit the patch I sent earlier as it prevents the system to get unresponsive. Regards, Fabio Estevam ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BUG: soft lockup when recording audio on MX28EVK with ASoC sgtl5000 2013-03-25 23:15 ` Fabio Estevam @ 2013-03-26 11:43 ` Hector Palacios 0 siblings, 0 replies; 3+ messages in thread From: Hector Palacios @ 2013-03-26 11:43 UTC (permalink / raw) To: Fabio Estevam Cc: linux-kernel@vger.kernel.org, Marek Vasut, alsa-devel@alsa-project.org, Shawn Guo, Dong Aisheng, Mark Brown Hi Fabio, On 03/26/2013 12:15 AM, Fabio Estevam wrote: > Hector, > > On Mon, Mar 25, 2013 at 4:31 PM, Fabio Estevam <festevam@gmail.com> wrote: >> Hi Hector, >> >> On Mon, Mar 25, 2013 at 7:52 AM, Hector Palacios >> <hector.palacios@digi.com> wrote: >>> Hello, >>> >>> I just tried recording audio on Freescale's MX28EVK that uses ASoC sgtl5000 >>> (kernel v3.8) with: >>> >>> arecord -M -f cd sound.wav --duration 10 >>> >>> and got a scheduler message: >>> >>> [ 789.041847] [sched_delayed] sched: RT throttling activated >> >> I have just tested arecord on 3.8,4 and I haven't seen the 'soft lockup' bug. >> >> However, I see that mxs saif gets busy after the record and any >> attempt to do an 'aplay' after the first arecord fails. >> >> With the attached patch applied I am able to do arecord/aplay sequence >> several times. >> >> I don't have a cable handy here to actually test if the sound is >> recorded properly or not. >> >> Could you please test it against 3.8.4? > > I managed to test arecord and it works with the following as follows: > > 1. Run alsamixer and select LINE_IN in the Capture element > > 2. Record with the following command line: > > arecord -D hw:0,1 -d 10 -f S16_LE -r 44100 -c test.wav This command works on v3.8 even without your patch. I can arecord/aplay several times without problems. With my original command 'arecord [-M] -f cd sound.wav --duration 10', the soft lockup appears both in v3.8 and v3.8.4 with and without your patch. So it looks like the patch does not help here. Regards, -- Héctor Palacios ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-26 11:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <51502C87.8050902@digi.com>
2013-03-25 19:31 ` BUG: soft lockup when recording audio on MX28EVK with ASoC sgtl5000 Fabio Estevam
2013-03-25 23:15 ` Fabio Estevam
2013-03-26 11:43 ` Hector Palacios
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox