From: "Ruslan N. Marchenko" <me@ruff.mobi>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH] pcm_bluetooth: accept BT_A2DP_SBC_SOURCE codec
Date: Fri, 22 Jun 2012 12:49:17 +0200 [thread overview]
Message-ID: <4FE44DAD.90004@ruff.mobi> (raw)
[-- 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;
next reply other threads:[~2012-06-22 10:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-22 10:49 Ruslan N. Marchenko [this message]
2012-06-22 20:34 ` [PATCH] pcm_bluetooth: accept BT_A2DP_SBC_SOURCE codec Luiz Augusto von Dentz
2012-06-23 14:40 ` Ruslan N. Marchenko
2012-06-29 14:02 ` Johan Hedberg
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=4FE44DAD.90004@ruff.mobi \
--to=me@ruff.mobi \
--cc=linux-bluetooth@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).