From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: "Luiz Augusto von Dentz" <luiz.dentz@gmail.com>,
"João Paulo Rechi Vita" <jprvita@gmail.com>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Add support for the source interface to audio IPC.
Date: Sun, 16 Aug 2009 14:51:53 -0300 [thread overview]
Message-ID: <2d5a2c100908161051n6604ce96wbb9acee6356df3f@mail.gmail.com> (raw)
In-Reply-To: <20090816173529.GA9132@jh-x301>
Hi Johan,
2009/8/16 Johan Hedberg <johan.hedberg@nokia.com>:
> Hi Luiz,
>
> On Sun, Aug 16, 2009, Luiz Augusto von Dentz wrote:
>> > On Sat, Aug 15, 2009, João Paulo Rechi Vita wrote:
>> >> if (!interface) {
>> >> - if (dev->sink && avdtp_is_connected(&dev->src, &dev->dst))
>> >> + if (dev->source && avdtp_is_connected(&dev->src, &dev->dst))
>> >> + return TYPE_SOURCE;
>> >> + else if (dev->sink && avdtp_is_connected(&dev->src, &dev->dst))
>> >> return TYPE_SINK;
>> >
>> > I think the dev->source check should be in an "else if" clause while the
>> > dev->sink check should be first. I.e. if a device happens to support both
>> > roles of A2DP we default to dev->sink.
>>
>> Good catches, perhaps we should consider doing avdtp_is_connected
>> check before checking for sink/source pointers. What do you think?
>
> What exactly do you mean? Could you perhaps give an example code snippet
> of how you'd like the code to look like?
>
> Johan
>
Something like this:
if (avdtp_is_connected(...)) {
if (dev->sink) return TYPE_SINK;
else if (dev->source) return TYPE_SOURCE;
else...
}
--
Luiz Augusto von Dentz
Engenheiro de Computação
next prev parent reply other threads:[~2009-08-16 17:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-16 2:44 [PATCH] Add support for the source interface to audio IPC João Paulo Rechi Vita
2009-08-16 2:44 ` [PATCH] Small optimization on " João Paulo Rechi Vita
2009-08-16 14:39 ` [PATCH] Add support for the source interface to " Johan Hedberg
2009-08-16 16:38 ` Luiz Augusto von Dentz
2009-08-16 17:36 ` Johan Hedberg
2009-08-16 17:51 ` Luiz Augusto von Dentz [this message]
2009-08-16 18:26 ` Johan Hedberg
2009-08-16 22:10 ` Johan Hedberg
2009-08-16 23:00 ` João Paulo Rechi Vita
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=2d5a2c100908161051n6604ce96wbb9acee6356df3f@mail.gmail.com \
--to=luiz.dentz@gmail.com \
--cc=jprvita@gmail.com \
--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