All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Philippe Gerum <rpm@xenomai.org>
Cc: "Pirou, Florent" <florent.pirou@intel.com>,
	"Hu, Mingliang" <mingliang.hu@intel.com>,
	"Wang, Rick Y" <rick.y.wang@intel.com>,
	xenomai@xenomai.org, evl@evlproject.org
Subject: Re: Useless dovetail hacks
Date: Mon, 21 Sep 2020 08:15:24 +0200	[thread overview]
Message-ID: <181a2c6b-0aa7-b189-237e-c8b8b3b39e9e@siemens.com> (raw)
In-Reply-To: <87pn6gcrw0.fsf@xenomai.org>

On 20.09.20 18:52, Philippe Gerum wrote:
> 
> Philippe Gerum <rpm@xenomai.org> writes:
>>
>> SPI, DMA, and GPIOs are a no brainer for this and are already available
>> in such form, serial and network need more analysis because their
>> execution contexts are either more clumsy/complex. I also got the PCM
>> portion of the Alsa stack enabled with a complete I/O path over the
>> real-time context, from the user (ioctl) request to send/recv frames to
>> some i2s device, via DMA transactions controlled by the PCM core. As
>> weird as it may seem, it is actually not that intrusive, and works quite
>> well, including at insane acquisition rates for feeding an audio
>> pipeline. There is still some work ahead to fix rough edges, but the
>> fundamentals look sane.
>>
> 
> I pushed more code to illustrate what I have been talking about. The
> eight topmost patches of the following branch implement a dual-kernel
> aware variant of the Alsa PCM core:
> 
> https://git.evlproject.org/linux-evl.git/log/?h=wip/audio
> 
> This is a quick forward port (compile-tested only so far) to v5.8 of the
> original working implementation based on v5.4. A very limited set of
> i.MX audio hardware (sai, wm8904) was enabled for demo purpose so far.
> 
> To exploit this in some app, one would need to issue the ioctl request
> (SNDRV_PCM_IOCTL_PREPARE_OOB), telling the real-time capable PCM core to
> switch a capture/playback (sub)stream to out-of-band mode
> (i.e. interrupts, DMA and scheduling controlled end-to-end by the
> real-time core, EVL in this case). I plan to hack this into tinyalsa,
> which should be just fine for running simply audio pipelines, calling
> pcm_readi()/pcm_writei() basically.
> 

That problem was never about straightforward lock conversion. It was 
always about architectural conversions. That may only change with the 
mainline drivers if PREEMPT-RT triggers more rework and more RT friendly 
architectures.

And, again, I do not want tones of driver conversions complicate the 
porting to new kernel versions. That is what will happen if spreading 
this pattern significantly. I.e., you will also need maintainers and 
deprecation policies for these enabling driver patches as they will 
quickly bitrot, just differently.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


  reply	other threads:[~2020-09-21  6:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 16:47 Useless dovetail hacks Jan Kiszka
2020-09-11 16:32 ` Philippe Gerum
2020-09-11 19:16   ` Jan Kiszka
2020-09-12 16:40     ` Philippe Gerum
2020-09-15 11:21       ` Jan Kiszka
2020-09-18 16:17         ` Philippe Gerum
2020-09-21  5:53           ` Jan Kiszka
2020-09-29 14:31             ` Philippe Gerum
2020-09-20 16:52       ` Philippe Gerum
2020-09-21  6:15         ` Jan Kiszka [this message]
2020-09-21  6:21           ` Jan Kiszka
2020-09-21  7:23             ` Philippe Gerum

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=181a2c6b-0aa7-b189-237e-c8b8b3b39e9e@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=evl@evlproject.org \
    --cc=florent.pirou@intel.com \
    --cc=mingliang.hu@intel.com \
    --cc=rick.y.wang@intel.com \
    --cc=rpm@xenomai.org \
    --cc=xenomai@xenomai.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.