All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pcm_bluetooth: accept BT_A2DP_SBC_SOURCE codec
@ 2012-06-22 10:49 Ruslan N. Marchenko
  2012-06-22 20:34 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 4+ messages in thread
From: Ruslan N. Marchenko @ 2012-06-22 10:49 UTC (permalink / raw
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 408 bytes --]

Current implementation of the PCM code is considering capture (source) 
mode however it ignores codecs of the SBC_SOURCE type while parsing 
capabilities.
With these two lines source codec is accepted, although proper capture 
mode might require additional changes.

Signed-off-by: Ruslan N. Marchenko <me@ruff.mobi>
---
  audio/pcm_bluetooth.c |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)



[-- Attachment #2: 0001-pcm_bluetooth-accept-BT_A2DP_SBC_SOURCE-codec.patch --]
[-- Type: text/x-patch, Size: 534 bytes --]

diff --git a/audio/pcm_bluetooth.c b/audio/pcm_bluetooth.c
index b9da805..5d69e2f 100644
--- a/audio/pcm_bluetooth.c
+++ b/audio/pcm_bluetooth.c
@@ -1630,8 +1630,10 @@ static int bluetooth_parse_capabilities(struct bluetooth_data *data,
 		return 0;
 
 	while (bytes_left > 0) {
-		if ((codec->type == BT_A2DP_SBC_SINK) &&
+		if (((codec->type == BT_A2DP_SBC_SINK) &&
 				!(codec->lock & BT_WRITE_LOCK))
+		|| ((codec->type == BT_A2DP_SBC_SOURCE) &&
+				!(codec->lock & BT_READ_LOCK)))
 			break;
 
 		bytes_left -= codec->length;


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

* Re: [PATCH] pcm_bluetooth: accept BT_A2DP_SBC_SOURCE codec
  2012-06-22 10:49 [PATCH] pcm_bluetooth: accept BT_A2DP_SBC_SOURCE codec Ruslan N. Marchenko
@ 2012-06-22 20:34 ` Luiz Augusto von Dentz
  2012-06-23 14:40   ` Ruslan N. Marchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2012-06-22 20:34 UTC (permalink / raw
  To: Ruslan N. Marchenko; +Cc: linux-bluetooth

Hi Ruslan,

On Fri, Jun 22, 2012 at 1:49 PM, Ruslan N. Marchenko <me@ruff.mobi> wrote:
> Current implementation of the PCM code is considering capture (source) mode
> however it ignores codecs of the SBC_SOURCE type while parsing capabilities.
> With these two lines source codec is accepted, although proper capture mode
> might require additional changes.
>
> Signed-off-by: Ruslan N. Marchenko <me@ruff.mobi>
> ---
>  audio/pcm_bluetooth.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

We are about to remove alsa support from BlueZ as it doesn't support
the Media API, so this is a nak

Please next time use git format-patch + git send-email so it is easier
to us to apply the patch using git am, also there is no need for the
signed-off-by for userspace patches.


-- 
Luiz Augusto von Dentz

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

* Re: [PATCH] pcm_bluetooth: accept BT_A2DP_SBC_SOURCE codec
  2012-06-22 20:34 ` Luiz Augusto von Dentz
@ 2012-06-23 14:40   ` Ruslan N. Marchenko
  2012-06-29 14:02     ` Johan Hedberg
  0 siblings, 1 reply; 4+ messages in thread
From: Ruslan N. Marchenko @ 2012-06-23 14:40 UTC (permalink / raw
  To: Luiz Augusto von Dentz, BlueZ

Hi Luiz Augusto,

Am 22.06.2012 22:34, schrieb Luiz Augusto von Dentz:
> Hi Ruslan,
>
> On Fri, Jun 22, 2012 at 1:49 PM, Ruslan N. Marchenko <me@ruff.mobi> wrote:
>> Current implementation of the PCM code is considering capture (source) mode
>> however it ignores codecs of the SBC_SOURCE type while parsing capabilities.
>> With these two lines source codec is accepted, although proper capture mode
>> might require additional changes.
>>
>> Signed-off-by: Ruslan N. Marchenko <me@ruff.mobi>
>> ---
>>   audio/pcm_bluetooth.c |    4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
> We are about to remove alsa support from BlueZ as it doesn't support
> the Media API, so this is a nak
I see even trunk PA, mentioned [1] to be using Media API is using same 
calls in the same ipc.c(bt_audio_service_open) - is it something still 
to be cleaned up?
Anyway - does it make sense to port pcm_bluetooth to Media API 
(media.c)? Or BlueZ team is going to abandon it in favour of PA in any 
case? I mean if someone submit patches for pcm on Media API is there 
chance for patches to be accepted?

1. - 
http://lists.freedesktop.org/archives/pulseaudio-discuss/2011-November/012222.html
> Please next time use git format-patch + git send-email so it is easier
> to us to apply the patch using git am, also there is no need for the
> signed-off-by for userspace patches.
Thanks for tips, will follow.

-- 
Looking forward to reading yours...
      Ruslan N. Marchenko


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

* Re: [PATCH] pcm_bluetooth: accept BT_A2DP_SBC_SOURCE codec
  2012-06-23 14:40   ` Ruslan N. Marchenko
@ 2012-06-29 14:02     ` Johan Hedberg
  0 siblings, 0 replies; 4+ messages in thread
From: Johan Hedberg @ 2012-06-29 14:02 UTC (permalink / raw
  To: Ruslan N. Marchenko; +Cc: Luiz Augusto von Dentz, BlueZ

Hi Ruslan,

On Sat, Jun 23, 2012, Ruslan N. Marchenko wrote:
> Anyway - does it make sense to port pcm_bluetooth to Media API
> (media.c)? Or BlueZ team is going to abandon it in favour of PA in
> any case? I mean if someone submit patches for pcm on Media API is
> there chance for patches to be accepted?

I doubt this would make it in time for BlueZ 5, but I don't think
there'd be any objections to accepting a patch later that adds an ALSA
user space plugin with a clean implementation for the Media interface.

Johan

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

end of thread, other threads:[~2012-06-29 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-22 10:49 [PATCH] pcm_bluetooth: accept BT_A2DP_SBC_SOURCE codec Ruslan N. Marchenko
2012-06-22 20:34 ` Luiz Augusto von Dentz
2012-06-23 14:40   ` Ruslan N. Marchenko
2012-06-29 14:02     ` Johan Hedberg

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.