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: Fri, 17 Aug 2007 13:06:09 +0200 [thread overview]
Message-ID: <1187348769.6698.373.camel@violet> (raw)
In-Reply-To: <46C57B93.7040905@free.fr>
Hi Fabien,
> >> Ok, then we have to implement snd_pcm_get_delay() and offer the option
> >> to the application to sleep itself (or do other time consuming tasks
> >> such as video decoding). However when the application sends data too
> >> fast (such as a simple aplay) we *have* to do the sleeping ourselves to
> >> prevents cuts on the headset side :-)
> >
> > Aplay is not sending the data too fast. aplay tries to fill the sound
> > card buffer as 100% of sound playing application do.
> > Buffer size being known, delay determine available space. When there is
> > space, aplay writes data and that's all.
> >
> > The current plugin delay implementation is the number of data written
> > (not played) => delay is always 0 => buffer is always empty => aplay
> > fills it => plugin have to wait in the write() call.
> >
>
> Ok, this time i understood. I agree with you. Which means two things:
> * i basically screwed up the pcm plugin i did a while ago for headsetd
> :-(. I was wrongs about the sleeping stuff. I understood alsa dynamic
> behaviour the wrong way.
> * ALSA API has the builtin assomption that the data gets transmitted
> using a hardware ring buffer, which is not the bluetooth way of things
> when you send packets one after the other.
>
> This means we have to workaround this by implementing a virtual buffer
> with a virtual hardware pointer.
> While as Marcel, i'm not a big fan of threads, i'd tend to see them here
> as the less worse alternative we have :-) : so i'd say : let's go with
> threads !!
just a small correction. I hate threads. However since ALSA already uses
them, we can do, too. Otherwise you would never convince me to use
threads.
> > In fact, the only application to care about is the sound server.
>
> Could you be more specific on that ?
> If you think of pulseaudio as the sound server, i'm afraid a native
> pulse plugin will have to be written for good bluetooth support anyway.
That is the plan in the end. Having a native PulseAudio plugin that
connects over our IPC to the audio service.
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-17 11:06 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
2007-08-17 10:42 ` Fabien Chevalier
2007-08-17 11:06 ` Marcel Holtmann [this message]
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=1187348769.6698.373.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