From: Takashi Iwai <tiwai@suse.de>
To: Luuk van Dijk <lvd@mndmttr.nl>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: full/half duplex support
Date: Mon, 22 Nov 2004 12:35:20 +0100 [thread overview]
Message-ID: <s5hllcudslj.wl@alsa2.suse.de> (raw)
In-Reply-To: <1100896171.237.15.camel@wonder>
At 19 Nov 2004 21:29:31 +0100,
Luuk van Dijk wrote:
>
> On Fri, 2004-11-19 at 13:13, Takashi Iwai wrote:
>
> > Hmm, I don't understand your proposal here.
> >
> > AFAIUC, the problem is that the trigger callback is called twice, for
> > playback and capture, on the full-duplex mode. Basically ALSA assumes
> > that the playback and the capture streams are accessible
> > independently, so no such restriction is implemented (yet).
>
> no it looks like the callback is called multiple times for the second
> stream that is started. so: hwparams() and prepare() and trigger() for
> the first, say the capture substream works fine. then I start the
> playback substream. my prepare() knows to reconfig the dma when either
> channel is running, so that goes well too, and the trigger() knows that
> if either substream is running it doesn't need to start the dma i/o, but
> then the mid-layer queries the current dma pointer for the capture
> stream with the pointer() callback, and I think it doesn't like the
> answer (my interpretation), because I see that it calls trigger() again
> and again.
Then something wrong in the callback routines. Perhaps the pointer
callback doesn't return the proper expected position, and the core or
the application tries to stop/restart the stream.
The trigger(START) callback is called only in the three places.
One is the SND_PCM_START ioctl, one in the write, and one in the
read to start the stream. In any cases, the current status is checked
before the callback is called. So, the fact that the trigger callback
is called many times implies that the PCM state remains PREPARED even
after the first call.
Takashi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
prev parent reply other threads:[~2004-11-22 11:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-15 16:03 full/half duplex support Luuk van Dijk
2004-11-18 13:17 ` Takashi Iwai
2004-11-18 18:06 ` Luuk van Dijk
2004-11-19 12:13 ` Takashi Iwai
2004-11-19 20:29 ` Luuk van Dijk
2004-11-22 11:35 ` Takashi Iwai [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=s5hllcudslj.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=lvd@mndmttr.nl \
/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.