Re: Bluez 5.2 A2DP: "Unable to select SEP"

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

 



On Thu, Feb 28, 2013 at 12:23 PM, Von Dentz, Luiz
<luiz.von.dentz@xxxxxxxxx> wrote:

> On Thu, Feb 28, 2013 at 9:51 PM, Scott James Remnant <keybuk@xxxxxxxxxx> wrote:
>> I'm having some difficulties connecting up A2DP in BlueZ 5.2, and I'm
>> sure I'm just missing something obvious so would appreciate a second
>> set of eyes.
>>
>> I had thought that to send to an A2DP Sink on a device, I needed an
>> A2DP Source endpoint at my end, but when I try and register that
>> endpoint I just get org.bluez.Error.NotSupported
>
> Check your /etc/bluetooth/audio.conf, you must have disabled it for some reason.
>

There isn't an audio.conf shipped with BlueZ 5.2; checking
profiles/audio/manager.c it has:

static struct enabled_interfaces enabled = {
        .sink           = TRUE,
        .source         = FALSE,
        .control        = TRUE,
};

This seems bizarre that registering audio sinks (which I read as
sending A2DP from the device to the host) is enabled by default, but
not the more usual registering of an audio source (to send to an A2DP
sink on the device).

>> I can register an A2DP Sink endpoint no problem, but then when I call
>> org.bluez.Device1.Connect the connection fails with "Unable to select
>> SEP" in the logs.
>
> You need to register a A2DP Source endpoint in case you want to send
> to a Sink, maybe what happened is that we change the roles in the
> audio.conf, it used to be the remote role/interface but I think commit
> 3a45f6e39fb89da3e518c43aa1bde5f41209c07d has changed that probably by
> mistake since it doesn't mention anything in the description of the
> patch.
>

Looking at this patch, it looks like the behavior before was that you
could register both if either Source or Sink were enabled, and since
Sink was enabled, you could enable Sources.

> Now the question is, shall we bring the old behavior back? In the long
> term I think we will move away of plugin specific config file such as
> audio.conf and have something in main.conf to disable the
> plugins/profiles.

I guess, but I think the basic problem here is just that the defaults
are wrong? It looks like they're flipped compared to the sensible
default? ie.

diff --git a/profiles/audio/manager.c b/profiles/audio/manager.c
index 934227e..dfff565 100644
--- a/profiles/audio/manager.c
+++ b/profiles/audio/manager.c
@@ -71,8 +71,8 @@ static GKeyFile *config = NULL;
 static GSList *devices = NULL;

 static struct enabled_interfaces enabled = {
-       .sink           = TRUE,
-       .source         = FALSE,
+       .sink           = FALSE,
+       .source         = TRUE,
        .control        = TRUE,
 };


Would be what we actually want by default?

Scott
--
Scott James Remnant | Chrome OS Systems | keybuk@xxxxxxxxxx | Google
--
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