linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A2DP sink indications + autoclose after suspension
@ 2010-02-23 12:58 Jacek Szczech
  2010-02-23 20:14 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 2+ messages in thread
From: Jacek Szczech @ 2010-02-23 12:58 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

I succeeded writing a program that receives a2dp stream (from my mobile
phone), decodes and sends to stdout using unix/ipc interface. It'll be run on
old hw without X enviroment, that's why I didn't use already available
software (like pulseaudio).

I faced a few problems connected with suspension of stream:

1) Unix.c does not support indications (am I right?). How can I detect changes
of states (e.g. OPEN<->STREAMING)? I can detect suspension with EAGAIN on
stream_fd but it does not seem to be proper solution. Do you plan to support
indications in unix/ipc interface?

2) Will it be possible to get indications concerning OPEN<->STREAMING changes
on dbus Media interface?

3) After suspension of stream (SUSPEND sent from SRC) the stream
is CLOSEd after about 10 seconds. What part of code disconnects this? Is it a
way to avoid this? 

regards,
Jacek

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: A2DP sink indications + autoclose after suspension
  2010-02-23 12:58 A2DP sink indications + autoclose after suspension Jacek Szczech
@ 2010-02-23 20:14 ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2010-02-23 20:14 UTC (permalink / raw)
  To: Jacek Szczech; +Cc: linux-bluetooth

Hi,

2010/2/23 Jacek Szczech <jszczech@8planet.net>:
> Hi,
>
> I succeeded writing a program that receives a2dp stream (from my mobile
> phone), decodes and sends to stdout using unix/ipc interface. It'll be run on
> old hw without X enviroment, that's why I didn't use already available
> software (like pulseaudio).
>
> I faced a few problems connected with suspension of stream:
>
> 1) Unix.c does not support indications (am I right?). How can I detect changes
> of states (e.g. OPEN<->STREAMING)? I can detect suspension with EAGAIN on
> stream_fd but it does not seem to be proper solution. Do you plan to support
> indications in unix/ipc interface?

You can listen for State on Audio interface or in the profile specific
interfaces such as AudioSource/AudioSink/Headset.

> 2) Will it be possible to get indications concerning OPEN<->STREAMING changes
> on dbus Media interface?

Media interface is just for endpoint registration, but again you can
achieve the same by listen to State changes e.g. Connected <-> Playing

> 3) After suspension of stream (SUSPEND sent from SRC) the stream
> is CLOSEd after about 10 seconds. What part of code disconnects this? Is it a
> way to avoid this?

Afaik this is not triggered if there is a unix client holding a lock,
so if e.g. the headset reconnects you have to claim the socket
otherwise it will timeout.

-- 
Luiz Augusto von Dentz
Computer Engineer

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-23 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-23 12:58 A2DP sink indications + autoclose after suspension Jacek Szczech
2010-02-23 20:14 ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).