Re: Audio sink stream remains suspended on reconnection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alex,

On Wed, May 8, 2013 at 2:47 AM, Alex Deymo <deymo@xxxxxxxxxxxx> wrote:
> bluetoothd[21017]: profiles/audio/avdtp.c:session_cb()
> bluetoothd[21017]: profiles/audio/avdtp.c:avdtp_parse_cmd() Received SUSPEND_CMD
> bluetoothd[21017]: profiles/audio/a2dp.c:suspend_ind() Source
> 0x7f2acd437a00: Suspend_Ind
> bluetoothd[21017]: profiles/audio/avdtp.c:avdtp_sep_set_state() stream
> state changed: STREAMING -> OPEN
> bluetoothd[21017]: profiles/audio/sink.c:sink_set_state() State
> changed /org/bluez/hci0/dev_10_B7_F6_01_31_ED: SINK_STATE_PLAYING ->
> SINK_STATE_CONNECTED
> bluetoothd[21017]:
> profiles/audio/transport.c:transport_update_playing()
> /org/bluez/hci0/dev_10_B7_F6_01_31_ED/fd3 State=TRANSPORT_STATE_ACTIVE
> Playing=0
> bluetoothd[21017]:
> profiles/audio/transport.c:media_transport_remove_owner() Transport
> /org/bluez/hci0/dev_10_B7_F6_01_31_ED/fd3 Owner :1.1198
> bluetoothd[21017]: profiles/audio/transport.c:media_owner_free() Owner :1.1198
> bluetoothd[21017]: profiles/audio/transport.c:transport_set_state()
> State changed /org/bluez/hci0/dev_10_B7_F6_01_31_ED/fd3:
> TRANSPORT_STATE_ACTIVE -> TRANSPORT_STATE_IDLE
> bluetoothd[21017]: profiles/audio/a2dp.c:a2dp_sep_unlock() SEP
> 0x7f2acd437a00 unlocked

There device request the stream to be suspended, which is what it
happens and the transport is then set to idle state which should
indicate to the endpoint what happened.

>
> bluetoothd[21017]: profiles/audio/avdtp.c:session_cb()
> bluetoothd[21017]: profiles/audio/avdtp.c:avdtp_parse_cmd() Received START_CMD
> bluetoothd[21017]: profiles/audio/a2dp.c:start_ind() Source
> 0x7f2acd437a00: Start_Ind
> bluetoothd[21017]: profiles/audio/avdtp.c:avdtp_ref() 0x7f2acd43ce70: ref=3
> bluetoothd[21017]: profiles/audio/avdtp.c:avdtp_sep_set_state() stream
> state changed: OPEN -> STREAMING
> bluetoothd[21017]: profiles/audio/sink.c:sink_set_state() State
> changed /org/bluez/hci0/dev_10_B7_F6_01_31_ED: SINK_STATE_CONNECTED ->
> SINK_STATE_PLAYING
> bluetoothd[21017]:
> profiles/audio/transport.c:transport_update_playing()
> /org/bluez/hci0/dev_10_B7_F6_01_31_ED/fd3 State=TRANSPORT_STATE_IDLE
> Playing=1
> bluetoothd[21017]: profiles/audio/transport.c:transport_set_state()
> State changed /org/bluez/hci0/dev_10_B7_F6_01_31_ED/fd3:
> TRANSPORT_STATE_IDLE -> TRANSPORT_STATE_PENDING
> bluetoothd[21017]: profiles/audio/avdtp.c:avdtp_unref() 0x7f2acd43ce70: ref=2

Here it asks the stream to resume, transport state goes to pending
which normally triggers the endpoint to Acquire the fd.

>
> bluetoothd[21017]: profiles/audio/avdtp.c:session_cb()
> bluetoothd[21017]: profiles/audio/avdtp.c:avdtp_parse_resp() SUSPEND
> request succeeded
> bluetoothd[21017]: profiles/audio/avdtp.c:avdtp_sep_set_state() stream
> state changed: STREAMING -> OPEN
> bluetoothd[21017]: profiles/audio/sink.c:sink_set_state() State
> changed /org/bluez/hci0/dev_10_B7_F6_01_31_ED: SINK_STATE_PLAYING ->
> SINK_STATE_CONNECTED
> bluetoothd[21017]:
> profiles/audio/transport.c:transport_update_playing()
> /org/bluez/hci0/dev_10_B7_F6_01_31_ED/fd3
> State=TRANSPORT_STATE_PENDING Playing=0
> bluetoothd[21017]: profiles/audio/transport.c:transport_set_state()
> State changed /org/bluez/hci0/dev_10_B7_F6_01_31_ED/fd3:
> TRANSPORT_STATE_PENDING -> TRANSPORT_STATE_IDLE
> bluetoothd[21017]: profiles/audio/a2dp.c:suspend_cfm() Source
> 0x7f2acd437a00: Suspend_Cfm

The endpoint probably didn't acquire the fd so we suspend the stream.
Anyway the device is misbehaving if it is sending suspend and start
commands like that (perhaps you are pressing play/pause buttons?) but
if you don't wan't the stream to auto suspend you just need to Acquire
when the transport is in pending state.


--
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux