Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Fix a2dp play when sample rate changed
@ 2010-10-26 15:32 John Crosbie
  2010-10-26 15:57 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: John Crosbie @ 2010-10-26 15:32 UTC (permalink / raw)
  To: linux-bluetooth

I have found that playing a 48KHz wav file immediately after playing a
44.1K file (or vice-versa) with aplay will fail.  After this failure
no a2dp stream will play.  The problem is that after determining the
current avdtp stream doesn't match the new configuration the stream is
closed and a reconfiguration is attempted but fails because
setup->rsep is null.  The patch below fixes the reconfiguration.

John Crosbie
Excelfore Corporation


diff --git a/audio/a2dp.c b/audio/a2dp.c
index 7a36132..b9b5e4a 100644
--- a/audio/a2dp.c
+++ b/audio/a2dp.c
@@ -1028,6 +1028,12 @@ static gboolean a2dp_reconfigure(gpointer data)
        struct a2dp_sep *sep = setup->sep;
        int posix_err;

+       if(!setup->rsep)
+               setup->rsep = avdtp_find_remote_sep(setup->session, sep->lsep);
        posix_err = avdtp_set_configuration(setup->session, setup->rsep,
                                                sep->lsep,
                                                setup->client_caps,

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

end of thread, other threads:[~2010-10-26 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-26 15:32 [PATCH] Fix a2dp play when sample rate changed John Crosbie
2010-10-26 15:57 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox