From: Carlo Wood <carlo@alinoe.com>
To: "alsa-devel@lists.sourceforge.net" <alsa-devel@lists.sourceforge.net>
Subject: Re: snd_pcm_mmap_begin returns 0 but sets areas to NULL
Date: Tue, 22 Jul 2003 16:38:34 +0200 [thread overview]
Message-ID: <20030722143834.GA28051@alinoe.com> (raw)
In-Reply-To: <20030722135158.GA12258@alinoe.com>
On Tue, Jul 22, 2003 at 03:51:58PM +0200, Carlo Wood wrote:
> int err = snd_pcm_mmap_begin(handle, &areas, &offset, &frames);
>
> returns err == 0, but results in areas == NULL ?
I looked deeper into it, and it happens because
snd_pcm_mmap_begin returns snd_pcm_mmap_areas()
which returns pcm->running_areas:
314 static inline const snd_pcm_channel_area_t *snd_pcm_mmap_areas(snd_pcm_t *pcm)
315 {
316 if (pcm->stopped_areas &&
317 snd_pcm_state(pcm) != SND_PCM_STATE_RUNNING)
318 return pcm->stopped_areas;
319 return pcm->running_areas;
320 }
where
(gdb) p *pcm
$6 = {dl_handle = 0x40016670, name = 0x81a5088 "emu10k1", type = SND_PCM_TYPE_HW, stream = SND_PCM_STREAM_CAPTURE,
mode = 0, poll_fd = 9, poll_events = 1, setup = 1, access = SND_PCM_ACCESS_RW_INTERLEAVED,
format = SND_PCM_FORMAT_S16_LE, subformat = SND_PCM_SUBFORMAT_STD, channels = 1, rate = 22050, period_size = 384,
period_time = 17414, periods = {min = 0, max = 0, openmin = 0, openmax = 0, integer = 0, empty = 0}, tick_time = 1000,
tstamp_mode = SND_PCM_TSTAMP_NONE, period_step = 1, sleep_min = 0, avail_min = 384, start_threshold = 1,
stop_threshold = 768, silence_threshold = 0, silence_size = 0, xfer_align = 384, boundary = 1610612736, info = 65795,
msbits = 16, rate_num = 22050, rate_den = 1, fifo_size = 0, buffer_size = 768, buffer_time = {min = 0, max = 0,
openmin = 0, openmax = 0, integer = 0, empty = 0}, sample_bits = 16, frame_bits = 16, appl = {master = 0x0,
ptr = 0x4001b000, fd = 9, offset = -2130706432, link_dst_count = 0, link_dst = 0x0, private_data = 0x0, changed = 0},
hw = {master = 0x0, ptr = 0x40018008, fd = 9, offset = -2147483640, link_dst_count = 0, link_dst = 0x0,
private_data = 0x0, changed = 0}, min_align = 1, mmap_rw = 0, donot_close = 0, mmap_channels = 0x0,
running_areas = 0x0, stopped_areas = 0x0, ops = 0x400cdc20, fast_ops = 0x400cdc60, op_arg = 0x804ffa8,
fast_op_arg = 0x804ffa8, private_data = 0x81a4a98, async_handlers = {next = 0x80e5304, prev = 0x80e5304}}
Why is running_areas == 0x0 ??
I need direct read access for this capture-stream.
--
Carlo Wood <carlo@alinoe.com>
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
next prev parent reply other threads:[~2003-07-22 14:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-22 13:51 snd_pcm_mmap_begin returns 0 but sets areas to NULL Carlo Wood
2003-07-22 14:38 ` Carlo Wood [this message]
2003-07-22 16:02 ` Takashi Iwai
2003-07-23 7:00 ` Jaroslav Kysela
2003-07-23 6:57 ` Jaroslav Kysela
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=20030722143834.GA28051@alinoe.com \
--to=carlo@alinoe.com \
--cc=alsa-devel@lists.sourceforge.net \
/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.