Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp214178ybz; Wed, 15 Apr 2020 07:25:40 -0700 (PDT) X-Google-Smtp-Source: APiQypIvaDLulASsSCCJ33zKqg1+pjE5zlR+u3YHy4QTpcC/i86cZgZR7mRL7edPweYJLygilX+x X-Received: by 2002:a05:6402:3136:: with SMTP id dd22mr8030617edb.165.1586960740449; Wed, 15 Apr 2020 07:25:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586960740; cv=none; d=google.com; s=arc-20160816; b=WKsxN0NuApChkBPRJ7ky2LxJ+CJshUYrd4pEfdoFkJLP6B2awPGHFyUul/eAjHKQl5 6BAMMhUL9hFseY+LcwmN0gO0k2v0xuBQwh8YckZddff7FRoL5M7+QxlYRE4Z2nZoB9hK bHNW9QxHaCpdyyDk+IfhIIsRZm1Pumsy0PFww946Cc0JsBUEFZmOzDIt/duwwCu/Kqyr gY+hPWJyMYgGZMUPrJ7HFLnYEI6+8lCQQvLevRa8turXHAgkSqU3lm3KSU+9YFMBdJXx AkMP0E6HKDWQIpvzjgCj4Rvpqza0RlK1qPH5sNH9OxjoyuwDvyJdEDqBAmB2OS+cmYCE WNAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=USO/vHBaU3vX6/jupcjetqm1F7gl8FKhcxDvOffuOSk=; b=w865bkJMNpXFTlz4LAEBWcd28E3+5mH1VI9419immJFkZ2Ml6MBI0+nQtEISPNPT0m 2Uf26pGiUNPXGkFRi2jWkj0AFWLtcc8poBEjMbl4+mF6nIBrbyMwdVVYZRXp0FaZVMcE Yswr+lzQwepdSuS8IovFf954Rhy1BHdXw+hvHAxySs+Fz4XAHqeYIJ55Ll2XA6q/yX/3 VX8qFCTx6ho9fKnL9DxJNTm+7Xti8RFPSvNFbqp6AxX4p5kjWb/G8BBqGHJWZg6X47G0 XsrDl7taxYvuvehuSVQ2zY8ZQkGNTwRg1UbmSFDEd0Evvc5/0dMlzuwWYkJfnGqG+vjl DqMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uFQJUfDj; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi18si10896887edb.109.2020.04.15.07.25.01; Wed, 15 Apr 2020 07:25:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uFQJUfDj; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731136AbgDNW4Y (ORCPT + 99 others); Tue, 14 Apr 2020 18:56:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:53358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730783AbgDNW4X (ORCPT ); Tue, 14 Apr 2020 18:56:23 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B3CAA2074D; Tue, 14 Apr 2020 22:56:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586904980; bh=SN/3fRjFpg2lBkE+CmIqSY8AlgC2+ERt/p7/6ukwTCk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uFQJUfDjEFRYtKJ0DhfBwqNzjTvanZeg07TbYpWJIPGLL2N9pJKfwZ0fmnsCZ/+NI 51Lk3EGgQ4NVzTqWhQ5lHv3KPWG/Ft+fp5zXyx7+xiDPubapWFs7VnDXKv4NvCe0i7 O7Ib7H/r38ZflCQif4WGexfwV4RoTzhW5CjW6/PI= Received: by pali.im (Postfix) id 6CA807DE; Wed, 15 Apr 2020 00:56:18 +0200 (CEST) Date: Wed, 15 Apr 2020 00:56:18 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Marcel Holtmann , Johan Hedberg , "David S. Miller" , Jakub Kicinski , Pavel Machek , Luiz Augusto von Dentz , Sebastian Reichel , David Heidelberg Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Removal of HCI commands? (Was: Re: OCF_READ_LOCAL_CODECS is permitted only for root user) Message-ID: <20200414225618.zgh5h4jexahfukdl@pali> References: <20191228171212.56anj4d4kvjeqhms@pali> <45BB2908-4E16-4C74-9DB4-8BAD93B42A21@holtmann.org> <20200104102436.bhqagqrfwupj6hkm@pali> <20200209132137.7pi4pgnassosh3ax@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200209132137.7pi4pgnassosh3ax@pali> User-Agent: NeoMutt/20180716 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Sunday 09 February 2020 14:21:37 Pali Rohár wrote: > 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? Hello! I have not got any answer to my email from Marcel for months, so I'm adding other developers to loop. Could somebody tell me that is the replacement API if above one is going to be removed? I was not able to find any documentation where could be described this API nor information about deprecation / removal. And are you aware of the fact that removing of API could potentially break existing applications? I really need to know which API should I use, because when I use API which is going to be removed, then my application stops working. And I really want to avoid it. Also I have not got any response yet, how can I read list of supported codecs by bluetooth adapter by ordinary non-root user? Audio application needs to know list of supported codecs and it is really insane to run it as root.