mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: 陆朱伟 <alex_lu@realsil.com.cn>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	"Gustavo F. Padovan" <gustavo@padovan.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	linux-bluetooth <linux-bluetooth@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rtlbt: Add Realtek Bluetooth profiling support
Date: Sat, 11 Feb 2017 09:44:43 +0100	[thread overview]
Message-ID: <74212B17-7307-41ED-B2DA-C40CBBA508CF@holtmann.org> (raw)
In-Reply-To: <0551C926975A174EA8972327741C7889ED340CE5@RS-MBS01.realsil.com.cn>

Hi Alex,

> First, let me explain the BT profiling.
> BT profiling parses some packets like connection complete event, l2cap conn req/rsp, ... to get profiles information for firmware.
> Firmware uses the information to balance packet transmission priority to get good user experience.
> The typical scenarios:
> 1. a2dp transmission and opp transmission at the same time.

that should work just fine with SO_PRIORITY. There is no need for the firmware to play tricks. Just trust that we prioritise the packets correctly. Which we already do.

> 2. a2dp transmission and WiFi data transmission with one shared antenna at the same time.
> a2dp transmission needs higher priority.

I wonder why not use the SO_PRIORITY setting we have anyway. It is actually more precise than what you have based on ACL handles. Since it will even prioritise between different L2CAP connections on the same ACL handle.

> Currently I found there is no filter for the specific packets except checking packets from hci raw/monitor socket or hack in btusb.c
> If I miss something, please let me know, thanks.

There is nothing for it since it was never needed. As I said, doing this for Bluetooth vs Bluetooth connections inside the firmware, that is totally pointless. Just trust the host stack that it sends you the packets in the right order. Which is what we do.

For WiFi sharing the same antenna, I am fine adding extra callbacks to the driver. However this has to be internal and handed to the driver as extra information. As I said above, we already have SO_PRIORITY and so we know which ACL handle gets priority over another. We actually also know this for L2CAP connections and RFCOMM channels since it works all the way through the stack.

> For the vendor commands HCI_VENDOR_SET_PF_REPORT_CMD and HCI_VENDOR_SET_BITPOOL_CMD, the former is used to send BT profiles information to firmware.
> The other is used to send bitpool value(from a2dp) to firmware.

I want the full description here. Especially the SET_PF_REPORT_CMD. What are the parameters and how is it suppose to work. How often does it need to be used. How to clear that information, do they survive HCI_Reset etc. The best way is if you send me the Realtek HCI vendor documentation (privately if you want to).

As I said, I see the point for WiFi vs Bluetooth if you share the same antenna. And we can certainly make this work. I am however not trying to optimise Bluetooth vs Bluetooth since that actually does work correctly.

For the SBC bitpool setting of A2DP, I am not even sure on how that is relevant, but I would clearly do that as a second patch (if ever).

Regards

Marcel

      parent reply	other threads:[~2017-02-11  8:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 18:23 Larry Finger
2017-02-10  9:37 ` Luiz Augusto von Dentz
2017-02-10 11:09 ` Marcel Holtmann
     [not found]   ` <0551C926975A174EA8972327741C7889ED340CE5@RS-MBS01.realsil.com.cn>
2017-02-11  8:44     ` Marcel Holtmann [this message]

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=74212B17-7307-41ED-B2DA-C40CBBA508CF@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=alex_lu@realsil.com.cn \
    --cc=gustavo@padovan.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®