From: Matt Ranostay <matt@ranostay.consulting>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Tony Lindgren <tony@atomide.com>,
alsa-devel@alsa-project.org,
Linux OMAP List <linux-omap@vger.kernel.org>
Subject: Re: [PATCH v6] ASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent glitches
Date: Thu, 12 Jan 2017 19:21:25 -0800 [thread overview]
Message-ID: <CAJ_EiSR_2OBbW=HYNSJbghAv=DceiWkvL2FA1v-fx3Nkn9MsYg@mail.gmail.com> (raw)
In-Reply-To: <12e553d8-705f-8308-3f34-e461813068fc@ti.com>
On Wed, Jan 11, 2017 at 11:55 PM, Peter Ujfalusi <peter.ujfalusi@ti.com> wrote:
> On 01/12/2017 09:35 AM, Matt Ranostay wrote:
>> We can get audio errors if hitting deeper idle states on omaps:
>>
>> [alsa.c:230] error: Fatal problem with alsa output, error -5.
>> [audio.c:614] error: Error in writing audio (Input/output error?)!
>>
>> This seems to happen with off mode idle enabled as power for the
>> whole SoC may get cut off between filling the McBSP fifo using DMA.
>> While active DMA blocks deeper idle states in hardware, McBSP
>> activity does not seem to do so.
>>
>> Basing the QoS latency calculation on the FIFO size, threshold,
>> sample rate, and channels.
>>
>> Based on the original patch by Tony Lindgren
>> Link: https://patchwork.kernel.org/patch/9305867/
>>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
>> ---
>> Changes from v1:
>> * add calculations for latency per number of FIFO locations
>>
>> Changes from v2:
>> * add missing mcbsp.h header change
>>
>> Changes from v3:
>> * base the latency calculations on threshold, buffer size, sample
>> rate, and channels
>>
>> Changes from v4:
>> * using Peter Ujfalusi's suggestions for restoring a higher latency on
>> audio stream completion, or if not applicable remove the QoS request
>>
>> Changes from v5:
>> * clean up latency checking logic
>> * move logic to .prepare and .shutdown to avoid functions that can sleep
>>
>> Changes from v6:
>> * move QoS removal to asoc_mcbsp_remove from omap_mcbsp_cleanup
>
> Looks good.
>
> You can add my
> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> to v7...
Will do.
>
>>
>> sound/soc/omap/mcbsp.c | 1 +
>> sound/soc/omap/mcbsp.h | 3 +++
>> sound/soc/omap/omap-mcbsp.c | 47 ++++++++++++++++++++++++++++++++++++++++++++-
>> 3 files changed, 50 insertions(+), 1 deletion(-)
>>
>> diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
>> index 06fec5699cc8..8fdb949a266e 100644
>> --- a/sound/soc/omap/mcbsp.c
>> +++ b/sound/soc/omap/mcbsp.c
>> @@ -25,6 +25,7 @@
>> #include <linux/io.h>
>> #include <linux/slab.h>
>> #include <linux/pm_runtime.h>
>> +#include <linux/pm_qos.h>
>
> Which would not add this include line ;)
>
Good god how did I miss that? **facepalm** Will fix in the final v7 :)
>>
>> #include <linux/platform_data/asoc-ti-mcbsp.h>
>>
>
> --
> Péter
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2017-01-13 3:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 7:35 [PATCH v6] ASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent glitches Matt Ranostay
2017-01-12 7:55 ` Peter Ujfalusi
2017-01-13 3:21 ` Matt Ranostay [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-01-11 5:46 Matt Ranostay
2017-01-11 7:26 ` Peter Ujfalusi
2017-01-11 8:32 ` Matt Ranostay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ_EiSR_2OBbW=HYNSJbghAv=DceiWkvL2FA1v-fx3Nkn9MsYg@mail.gmail.com' \
--to=matt@ranostay.consulting \
--cc=alsa-devel@alsa-project.org \
--cc=linux-omap@vger.kernel.org \
--cc=peter.ujfalusi@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).