linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Fischer <panig291088@web.de>
To: linux-bluetooth@vger.kernel.org
Subject: a2dp stream delayed if playback started immediately after connect
Date: Wed, 25 Mar 2020 06:58:58 +0100	[thread overview]
Message-ID: <9ADFBCB6-94B9-49D1-92AD-2211B8F7A9C6@web.de> (raw)

Hello guys, i have a little problem a2dp related.
I've written a mono c# application which will wait for a specific device (phone) is connected and will then start the music playback immediatly.
Pulseaudio is playing the music on its connected usb-soundcard. So at the moment when my phone gets connected the stream starts playing.
So when i press forward at the phone its command is delayed by approx. 2 seconds, so in the bluetoothd debug output i can see that AVRCP command is received immediatly. But the stream got a delay.
When i press pause and wait till this:
bluetoothd[20399]: profiles/audio/avdtp.c:avdtp_sep_set_state() stream state changed: STREAMING -> OPEN
bluetoothd[20399]: profiles/audio/source.c:source_set_state() State changed /org/bluez/hci0/dev_F0_98_9D_D8_46_19: SOURCE_STATE_PLAYING -> SOURCE_STATE_CONNECTED
bluetoothd[20399]: profiles/audio/transport.c:transport_update_playing() /org/bluez/hci0/dev_F0_98_9D_D8_46_19/sep1/fd1 State=TRANSPORT_STATE_ACTIVE Playing=0
bluetoothd[20399]: profiles/audio/transport.c:media_transport_remove_owner() Transport /org/bluez/hci0/dev_F0_98_9D_D8_46_19/sep1/fd1 Owner :1.56
bluetoothd[20399]: profiles/audio/transport.c:media_owner_free() Owner :1.56
bluetoothd[20399]: profiles/audio/transport.c:transport_set_state() State changed /org/bluez/hci0/dev_F0_98_9D_D8_46_19/sep1/fd1: TRANSPORT_STATE_ACTIVE -> TRANSPORT_STATE_IDLE
bluetoothd[20399]: profiles/audio/a2dp.c:a2dp_sep_unlock() SEP 0x114f798 unlocked
bluetoothd[20399]: src/device.c:connect_profiles() /org/bluez/hci0/dev_F0_98_9D_D8_46_19 (all), client :1.73
 
And start again, all commands and streams are back in sync.
Any tips? Is that Maybe pulseaudio related?
 
Thanks in advice,
chris

                 reply	other threads:[~2020-03-25  5:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=9ADFBCB6-94B9-49D1-92AD-2211B8F7A9C6@web.de \
    --to=panig291088@web.de \
    --cc=linux-bluetooth@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).