linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org, David Heidelberg <david@ixit.cz>
Subject: Re: OCF_READ_LOCAL_CODECS is permitted only for root user
Date: Sun, 9 Feb 2020 14:21:37 +0100	[thread overview]
Message-ID: <20200209132137.7pi4pgnassosh3ax@pali> (raw)
In-Reply-To: <20200104102436.bhqagqrfwupj6hkm@pali>

On Saturday 04 January 2020 11:24:36 Pali Rohár wrote:
> On Saturday 04 January 2020 10:44:52 Marcel Holtmann wrote:
> > Hi Pali,
> > 
> > > I wrote a simple script "sco_features.pl" which show all supported
> > > codecs by local HCI bluetooth adapter. Script is available at:
> > > 
> > > https://github.com/pali/hsphfpd-prototype/blob/prototype/sco_features.pl
> > > 
> > > And I found out that OCF_READ_LOCAL_CODECS HCI command cannot be send by
> > > non-root user. Kernel returns "Operation not permitted" error.
> > > 
> > > What is reason that kernel blocks OCF_READ_LOCAL_CODECS command for
> > > non-root users? Without it (audio) application does not know which
> > > codecs local bluetooth adapter supports.
> > > 
> > > E.g. OCF_READ_LOCAL_EXT_FEATURES or OCF_READ_VOICE_SETTING commands can
> > > be send also by non-root user and kernel does not block them.
> > 
> > actually the direct access to HCI commands is being removed. So we have no plans to add new commands into the list since that it what the kernel is suppose to handle. If we wanted to expose this, then it has to be via mgmt.
> 
> Hi Marcel! Thank you for information. I have not know that this API is
> "deprecated" and is going to be removed. But userspace audio
> applications need to know what bluetooth adapter supports, so can you
> export result of these commands to userspace? My script linked above
> calls: OCF_READ_VOICE_SETTING, OCF_READ_LOCAL_COMMANDS,
> OCF_READ_LOCAL_EXT_FEATURES, OCF_READ_LOCAL_CODECS

Hello! Just a gently reminder for this question. How to retrieve
information about supported codecs from userspace by non-root user?
Because running all bluetooth audio applications by root is not really a
solution. Plus if above API for root user is going to be removed, what
is a replacement?

-- 
Pali Rohár
pali.rohar@gmail.com

  reply	other threads:[~2020-02-09 13:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-28 17:12 OCF_READ_LOCAL_CODECS is permitted only for root user Pali Rohár
2020-01-04  9:44 ` Marcel Holtmann
2020-01-04 10:24   ` Pali Rohár
2020-02-09 13:21     ` Pali Rohár [this message]
2020-04-14 22:56       ` Removal of HCI commands? (Was: Re: OCF_READ_LOCAL_CODECS is permitted only for root user) Pali Rohár
2020-08-08 13:27         ` Pali Rohár
2020-09-29 21:32           ` Removal of HCI commands, userspace bluetooth regression? Pali Rohár
2020-09-30  8:02             ` Greg Kroah-Hartman
2020-09-30  8:16               ` Marcel Holtmann
2020-09-30  9:20                 ` Greg Kroah-Hartman
2020-09-30  9:49                   ` Pali Rohár
2020-09-30  8:25               ` Pali Rohár
2020-09-30  9:20                 ` Greg Kroah-Hartman
2020-09-30  9:46                   ` Pali Rohár
2020-09-30 10:54                     ` Greg Kroah-Hartman
2020-09-30 11:00                       ` Pali Rohár
2020-09-30 11:20                         ` Greg Kroah-Hartman
2020-09-30 11:51                           ` Pali Rohár
2020-09-30 12:02                             ` Greg Kroah-Hartman

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=20200209132137.7pi4pgnassosh3ax@pali \
    --to=pali.rohar@gmail.com \
    --cc=david@ixit.cz \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.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).