From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] An explanation of a2dpd weird behaviour on high resolution timers enabled kernels
Date: Tue, 14 Aug 2007 18:40:15 +0200 [thread overview]
Message-ID: <1187109615.6698.283.camel@violet> (raw)
In-Reply-To: <1187102836.3463.60.camel@ubuntu.mpl.access-company.com>
Hi Frederic,
> > > Even if enough data is buffered, you are not guaranteed that the
> > > application will send data in time. Worse, if enough data is buffered,
> > > the application can choose not to send more data. The application calls
> > > snd_pcm_get_delay(), then sleeps for the remaining delay, then sends new
> > > data. This is typically true at the end of a stream. The application
> > > write what can be written, then wait until the stream underrun, without
> > > writing anymore.
> >
> > I'm not sure i understood your last paragraph : could you please
> > expand/reformulate ?
>
> Let's take an example : An application write 40 ms of music.
> If you internally buffer the data, then the application will consider it
> written (not played yet).
> The application will then wait for the data to be played by repeatedly
> asking the delay until is it 0. However, that application
> will NOT call write(), preventing the plugin code to be executed.
>
> I already hear you saying, let's put the code in getdelay() too. This is not possible
> because the application can also call getdelay() once and wait, or even not call
> getdelay() at all, because the number of music data is known...
>
> However, using a thread can solve this issue.
while I am against threads, for the plugin it is actually okay since
ALSA uses threads anyway. For the audio service, threads are not welcome
and hereby forbidden by me ;)
> > Or at first we can just say "go to hell" to those applications that do
> > everything in the same thread and choose to solve the issue later :-)
>
> In fact, the only application to care about is the sound server.
Actually the audio service is not doing any audio handling at all. It
only drivers AVDTP signaling and parameter negotiation. That's it. The
plugin is responsible for the whole media channel. This actually
includes the AVDTP header for that channel including the SBC header and
the actual SBC encoded data.
The audio service gives the plugin a file descriptor to use and then the
plugin takes care of everything until the audio service decides to
disconnect or the remote side terminates the connection. This includes
start, stop etc., but that are implementation details.
The I expect the following applications to work: aplay, xmms/beep,
totem, ekiga and skype.
Regards
Marcel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2007-08-14 16:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-11 9:48 [Bluez-devel] An explanation of a2dpd weird behaviour on high resolution timers enabled kernels Fabien Chevalier
2007-08-11 18:01 ` Marcel Holtmann
2007-08-12 10:22 ` Fabien Chevalier
2007-08-13 9:59 ` Frederic Dalleau
2007-08-13 10:05 ` Marcel Holtmann
2007-08-13 15:54 ` Fabien Chevalier
2007-08-13 17:04 ` Marcel Holtmann
2007-08-13 17:49 ` Frederic Dalleau
2007-08-14 2:39 ` Luiz Augusto von Dentz
2007-08-14 12:51 ` Fabien Chevalier
2007-08-14 14:47 ` Frederic Dalleau
2007-08-14 16:40 ` Marcel Holtmann [this message]
2007-08-17 10:42 ` Fabien Chevalier
2007-08-17 11:06 ` Marcel Holtmann
2007-08-18 14:13 ` Fabien Chevalier
2007-08-17 13:41 ` Frederic Dalleau
2007-08-14 12:51 ` Fabien Chevalier
2007-08-14 16:44 ` Marcel Holtmann
2007-08-14 19:31 ` [Bluez-devel] Gnome Protocol Analyzer tjoconno
2007-08-17 11:17 ` [Bluez-devel] An explanation of a2dpd weird behaviour on high resolution timers enabled kernels Fabien Chevalier
2007-08-17 11:32 ` Marcel Holtmann
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=1187109615.6698.283.camel@violet \
--to=marcel@holtmann.org \
--cc=bluez-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox