All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rui Pedro Lopes <rlopes@ipb.pt>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] Some tests with the userland ALSA plugin for A2DP: problem with changing tracks
Date: Wed, 30 Aug 2006 10:07:30 +0100	[thread overview]
Message-ID: <44F55552.4050502@ipb.pt> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 1341 bytes --]

Hi,

I've been experimenting with the user land ALSA plugin for A2DP from
bluetooth-alsa project on Sourceforge.

It works fine (tried it with xmms and rhythmbox through gstreamer-alsa)
but there is a problem when changing tracks. When a song ends and xmms
jumps to the next track on the playlist, the sound no longer arrives the
headphones. If I press Stop and the Play, it starts playing again.
I send in attach the log of the debug messages for this behavior
(current.log).


I then tried commenting the line for registering the close action like this:
static snd_pcm_ioplug_callback_t a2dp_callback = {
        .start                  = a2dp_start,
        .stop                   = a2dp_stop,
        .pointer                = a2dp_pointer,
        .transfer               = a2dp_transfer2,
        //.close                        = a2dp_close,
        .hw_params              = a2dp_params,
        .prepare                = a2dp_prepare,
        .drain                  = a2dp_drain,
        .poll_descriptors_count = a2dp_descriptors_count,
        .poll_descriptors       = a2dp_descriptors,
        .poll_revents           = a2dp_poll,
};


It no longer fails when changing tracks. Apparently, it works
flawlessly. I also send the log for debug messages in attach (no_close.log).


Cheers,

/rp

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: current.log --]
[-- Type: text/x-log; name="current.log", Size: 5604 bytes --]

==== Starting xmms
Message: device: pcm.headphone

==== Pressing play
DEBUG: _snd_pcm_a2dp_open: name pcm.headphone mode 1
DEBUG: _snd_pcm_a2dp_open: bdaddr/dest is 00:0D:44:43:B7:01
DEBUG: a2dp_alloc: init
DEBUG: a2dp_connect: a2dp 0x825e1c8 (sk=0, control_sk=0)
DEBUG: connect_stream: Using address: 01:B7:43:44:0D:00
DEBUG: detect_a2dp: Found A2DP Sink
DEBUG: connect_stream: Found A2DP Sink at the destination
DEBUG: do_connect: Connected [imtu 672, omtu 672, flush_to 65535]
DEBUG: connect_stream: Sent the Stream End Point Discovery Command
DEBUG: connect_stream: Got a Stream End Point Discovery Response
DEBUG: connect_stream: received 1 capabilities
DEBUG: process_seid: SEID = 1
DEBUG: process_seid: Requested Capabilities for SEID = 1
DEBUG: process_seid: Got capabilities response
DEBUG: process_seid: Sent set configurations command
DEBUG: process_seid: Set configurations command accepted
DEBUG: process_seid: Sent open stream command
DEBUG: process_seid: Got open stream confirm
DEBUG: do_connect: Connected [imtu 672, omtu 678, flush_to 65535]
DEBUG: connect_stream: Sent stream start
DEBUG: connect_stream: Got start stream confirm
DEBUG: a2dp_constraint: TEST a2dp 0x825e1c8
DEBUG: a2dp_params: a2dp 0x825e1c8
DEBUG: a2dp_params: format S16_LE rate 44100 channels 2
DEBUG: a2dp_params: frame_bytes 4 period_bytes 8192 period_size 2048 buffer_size 4096
DEBUG: a2dp_prepare: a2dp 0x825e1c8
Listen thread running
Awaiting command
SBC Bandwidth = 27 kbps [27945 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
Awaiting command
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
Awaiting command
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]

==== Pressing Stop
DEBUG: a2dp_stop: a2dp 0x825e1c8
DEBUG: a2dp_stop: Listen thread terminating
Thread in signal handler 14
Error while receiving -1 (errno=4:Interrupted system call)
listen_thread: ending perfeclty
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_stop: a2dp 0x825e1c8
DEBUG: a2dp_stop: Listen thread terminating
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_close: a2dp Destroying 0x825e1c8
DEBUG: a2dp_close: OK

==== Pressing Play
DEBUG: _snd_pcm_a2dp_open: name pcm.headphone mode 1
DEBUG: _snd_pcm_a2dp_open: bdaddr/dest is 00:0D:44:43:B7:01
DEBUG: a2dp_alloc: init
DEBUG: a2dp_connect: a2dp 0x823ff68 (sk=0, control_sk=0)
DEBUG: connect_stream: Using address: 01:B7:43:44:0D:00
DEBUG: detect_a2dp: Found A2DP Sink
DEBUG: connect_stream: Found A2DP Sink at the destination
DEBUG: do_connect: Connected [imtu 672, omtu 672, flush_to 65535]
DEBUG: connect_stream: Sent the Stream End Point Discovery Command
DEBUG: connect_stream: Got a Stream End Point Discovery Response
DEBUG: connect_stream: received 1 capabilities
DEBUG: process_seid: SEID = 1
DEBUG: process_seid: Requested Capabilities for SEID = 1
DEBUG: process_seid: Got capabilities response
DEBUG: process_seid: Sent set configurations command
DEBUG: process_seid: Set configurations command accepted
DEBUG: process_seid: Sent open stream command
DEBUG: process_seid: Got open stream confirm
DEBUG: do_connect: Connected [imtu 672, omtu 678, flush_to 65535]
DEBUG: connect_stream: Sent stream start
DEBUG: connect_stream: Got start stream confirm
DEBUG: a2dp_constraint: TEST a2dp 0x823ff68
DEBUG: a2dp_params: a2dp 0x823ff68
DEBUG: a2dp_params: format S16_LE rate 44100 channels 2
DEBUG: a2dp_params: frame_bytes 4 period_bytes 8192 period_size 2048 buffer_size 4096
DEBUG: a2dp_prepare: a2dp 0x823ff68
Listen thread running
Awaiting command
SBC Bandwidth = 19 kbps [19872 bps]
SBC Bandwidth = 27 kbps [27945 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]

==== Pressing Next Track
DEBUG: a2dp_stop: a2dp 0x823ff68
DEBUG: a2dp_stop: Listen thread terminating
Thread in signal handler 14
Error while receiving -1 (errno=4:Interrupted system call)
listen_thread: ending perfeclty
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_stop: a2dp 0x823ff68
DEBUG: a2dp_stop: Listen thread terminating
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_close: a2dp Destroying 0x823ff68
DEBUG: a2dp_close: OK
DEBUG: _snd_pcm_a2dp_open: name pcm.headphone mode 1
DEBUG: _snd_pcm_a2dp_open: bdaddr/dest is 00:0D:44:43:B7:01
DEBUG: a2dp_constraint: TEST a2dp 0x823ff68
DEBUG: a2dp_params: a2dp 0x823ff68
DEBUG: a2dp_params: format S16_LE rate 44100 channels 2
DEBUG: a2dp_params: frame_bytes 4 period_bytes 8192 period_size 2048 buffer_size 4096
DEBUG: a2dp_prepare: a2dp 0x823ff68
SBC Bandwidth = 23 kbps [24219 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
------ no sound on the headphones ------

==== Terminating xmms
DEBUG: a2dp_stop: a2dp 0x823ff68
DEBUG: a2dp_stop: Listen thread terminating
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_stop: a2dp 0x823ff68
DEBUG: a2dp_stop: Listen thread terminating
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_close: a2dp Destroying 0x823ff68
DEBUG: a2dp_close: OK

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.3: no_close.log --]
[-- Type: text/x-log; name="no_close.log", Size: 4144 bytes --]

==== Starting xmms
Message: device: pcm.headphone

==== Pressing Play
DEBUG: _snd_pcm_a2dp_open: name pcm.headphone mode 1
DEBUG: _snd_pcm_a2dp_open: bdaddr/dest is 00:0D:44:43:B7:01
DEBUG: a2dp_alloc: init
DEBUG: a2dp_connect: a2dp 0x824ffc8 (sk=0, control_sk=0)
DEBUG: connect_stream: Using address: 01:B7:43:44:0D:00
DEBUG: detect_a2dp: Found A2DP Sink
DEBUG: connect_stream: Found A2DP Sink at the destination
DEBUG: do_connect: Connected [imtu 672, omtu 672, flush_to 65535]
DEBUG: connect_stream: Sent the Stream End Point Discovery Command
DEBUG: connect_stream: Got a Stream End Point Discovery Response
DEBUG: connect_stream: received 1 capabilities
DEBUG: process_seid: SEID = 1
DEBUG: process_seid: Requested Capabilities for SEID = 1
DEBUG: process_seid: Got capabilities response
DEBUG: process_seid: Sent set configurations command
DEBUG: process_seid: Set configurations command accepted
DEBUG: process_seid: Sent open stream command
DEBUG: process_seid: Got open stream confirm
DEBUG: do_connect: Connected [imtu 672, omtu 678, flush_to 65535]
DEBUG: connect_stream: Sent stream start
DEBUG: connect_stream: Got start stream confirm
DEBUG: a2dp_constraint: TEST a2dp 0x824ffc8
DEBUG: a2dp_params: a2dp 0x824ffc8
DEBUG: a2dp_params: format S16_LE rate 44100 channels 2
DEBUG: a2dp_params: frame_bytes 4 period_bytes 8192 period_size 2048 buffer_size 4096
DEBUG: a2dp_prepare: a2dp 0x824ffc8
Listen thread running
Awaiting command
SBC Bandwidth = 27 kbps [27945 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
Awaiting command
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]

==== Pressing Stop
DEBUG: a2dp_stop: a2dp 0x824ffc8
DEBUG: a2dp_stop: Listen thread terminating
Thread in signal handler 14
Error while receiving -1 (errno=4:Interrupted system call)
listen_thread: ending perfeclty
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_stop: a2dp 0x824ffc8
DEBUG: a2dp_stop: Listen thread terminating
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK

==== Pressing Play
DEBUG: _snd_pcm_a2dp_open: name pcm.headphone mode 1
DEBUG: _snd_pcm_a2dp_open: bdaddr/dest is 00:0D:44:43:B7:01
DEBUG: a2dp_constraint: TEST a2dp 0x824ffc8
DEBUG: a2dp_params: a2dp 0x824ffc8
DEBUG: a2dp_params: format S16_LE rate 44100 channels 2
DEBUG: a2dp_params: frame_bytes 4 period_bytes 8192 period_size 2048 buffer_size 4096
DEBUG: a2dp_prepare: a2dp 0x824ffc8
SBC Bandwidth = 20 kbps [21114 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]

==== Pressing Next Track
DEBUG: a2dp_stop: a2dp 0x824ffc8
DEBUG: a2dp_stop: Listen thread terminating
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_stop: a2dp 0x824ffc8
DEBUG: a2dp_stop: Listen thread terminating
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: _snd_pcm_a2dp_open: name pcm.headphone mode 1
DEBUG: _snd_pcm_a2dp_open: bdaddr/dest is 00:0D:44:43:B7:01
DEBUG: a2dp_constraint: TEST a2dp 0x824ffc8
DEBUG: a2dp_params: a2dp 0x824ffc8
DEBUG: a2dp_params: format S16_LE rate 44100 channels 2
DEBUG: a2dp_params: frame_bytes 4 period_bytes 8192 period_size 2048 buffer_size 4096
DEBUG: a2dp_prepare: a2dp 0x824ffc8
SBC Bandwidth = 24 kbps [25461 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
------ There is sound, since the connection is not closed ------

==== Terminating xmms
DEBUG: a2dp_stop: a2dp 0x824ffc8
DEBUG: a2dp_stop: Listen thread terminating
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_stop: a2dp 0x824ffc8
DEBUG: a2dp_stop: Listen thread terminating
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

[-- Attachment #2: Type: text/plain, Size: 373 bytes --]

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

             reply	other threads:[~2006-08-30  9:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-30  9:07 Rui Pedro Lopes [this message]
2006-08-30  9:33 ` [Bluez-devel] Some tests with the userland ALSA plugin for A2DP: problem with changing tracks Frédéric DALLEAU
2006-08-30 13:56   ` Rui Pedro Lopes

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=44F55552.4050502@ipb.pt \
    --to=rlopes@ipb.pt \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.