From: Clemens Ladisch <clemens@ladisch.de>
To: Anders Gnistrup <agn@datarespons.dk>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: question for the snd_pcm_mmap_writen.
Date: Tue, 11 Oct 2011 16:23:54 +0200 [thread overview]
Message-ID: <4E94517A.6000405@ladisch.de> (raw)
In-Reply-To: <C516192DA6D2B74F8192CDC209D958FD5826629B96@dr-mail>
On 10/11/2011 02:06 PM, Anders Gnistrup wrote:
> I have a embedded device with a 8 channel audio chip.
> I only have to use 5 of these channels
> My goal is not to use any cpu cycles on the 3 unused channels
>
> I have decided to use the non-interleaved method
This helps only if your device actually supports non-interleaved data.
Otherwise, the samples of all eight channels will have to be converted.
> For this, the function snd_pcm_mmap_writen could be used.
Please note that using mmap makes sense only if you write the data
directly into the device's buffer. If you only use snd_pcm_mmap_write*,
you could just as well use snd_pcm_write* without mmap.
> Q1)
> Should/must the **bufs be continuations -> bufs[0][size]==bufs[1][0]???
No.
> Q2)
> Is is possible the set bufs[2] == NULL, to signal that the channel is unused?
No, all channels must have data.
> Q3)
> I have tried to find some information about the SND_PCM_ACCESS_MMAP_COMPLEX. What is this???
Typically, it's used for devices that are constructed by mergng multiple
interleaved streams. Each channel is described by the address of its
first sample and the distance between two consecutive samples.
Regards,
Clemens
prev parent reply other threads:[~2011-10-11 14:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 12:06 question for the snd_pcm_mmap_writen Anders Gnistrup
2011-10-11 14:23 ` Clemens Ladisch [this message]
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=4E94517A.6000405@ladisch.de \
--to=clemens@ladisch.de \
--cc=agn@datarespons.dk \
--cc=alsa-devel@alsa-project.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.