Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp19482609ybl; Sat, 4 Jan 2020 02:25:05 -0800 (PST) X-Google-Smtp-Source: APXvYqwjin3l22qbplN9ouT7JgwloDOSA3XGEUFXnOngF3+ZQnxTyVtCEMpN52udXGhdSq07cXPh X-Received: by 2002:a9d:67d2:: with SMTP id c18mr100248438otn.362.1578133505099; Sat, 04 Jan 2020 02:25:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578133505; cv=none; d=google.com; s=arc-20160816; b=qNR/ysUAyhPC/D+pi/7QXiJDavFlmj8Jy/D1cJecS2v8ARNpbsfY+kGi05pCZ51ymr y1oEW4rbGZi/VGabUQVRR6ubmtbEpKFHBrLNsyLp0jHqKKiuke1Jx4pJ9E8e03IcJMVx Fc5ghxseRSAxn3aR7F2p+TyXlmASG6h39Oqf7R8VTF4J/7TlN6U1+gnOC+5+VxOjRunW wvODb2PicAPs496OoJvlhwrkCtv26FbFUQi7Rw1eWS7lGR/K8z7CA/bIbAG3ERdsgkoA j0wURh4YKz4MxBwpMeQBI3C8W5+NcLa8gEOIrsgwMBgk8Yes90Do9Q1/cxFGN4Ru6WhC cUtg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TzPzGZq9QtcezIQTiWiyQ/ncnr3tp/crmE+Gdkf6K3k=; b=yncknivNTFPDLqbEcvjMp2dgLeR1SywBeOX1ZVx2mY9pdyv2E5w405laHzmOiu5Uh0 BajLxUrh+Wdyuq3whaqtX5ex6pz+QWVBpPUQHudBl6IHhnGARSiozVdDXFvFO3PdWiMh NXkaFAbOHYErzXFUbTiVjw7o4c9k4q/gBE5bZHFjxWN7PEFP82BFsd8eO2tjOn4XfvrI +94JtMT6HDWEjkBDcMIJV/NGo9hdpEa1FBR0feBvJfHzedpvHK71EBjFcOtc77n2AhFC ira7t2FFGwIyLmHAaS9TeEzSAiSThzP4R3WqXdFObveXZorspSDQNpBWH1DFi15bP3IM uSyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u5qyfkvA; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r82si16825051oia.36.2020.01.04.02.24.43; Sat, 04 Jan 2020 02:25:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u5qyfkvA; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725796AbgADKYl (ORCPT + 99 others); Sat, 4 Jan 2020 05:24:41 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:33253 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725769AbgADKYl (ORCPT ); Sat, 4 Jan 2020 05:24:41 -0500 Received: by mail-wr1-f67.google.com with SMTP id b6so44640220wrq.0 for ; Sat, 04 Jan 2020 02:24:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TzPzGZq9QtcezIQTiWiyQ/ncnr3tp/crmE+Gdkf6K3k=; b=u5qyfkvAPRSzt/d32xThxF8rizpedhLqfiVnX6Y51Kr0OKk+zDRq1vbSJ3OmmmSvWD k28VIu/83Z046Ngsyg84+Zkp78Axf1AaO+18FjVeEum5nXf3fmB+HALu+ZLGWK3gvYsR N0sMdOP/k0oi1kJ7671vt3HbZSsn2tjyVhyiO8XqTlg2mrtAA4sTSQ8jb65rtJkc6eB1 gDS62KHvm87prZp4TXhDWReLJM/RDp5bmR0Ud2763I1n5yV84vGUV9BEH2CwHpDqrGD0 keNnndaPCMcxtOwTdqwB2z8n2PVTW8yncQ4Dl3WVQKlUqliZ4+5L1ZWGrEscLPBy0imq BseA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TzPzGZq9QtcezIQTiWiyQ/ncnr3tp/crmE+Gdkf6K3k=; b=Xw/kYS+XdLnqLjgIYfQpPgDAV7j9AvgqKEuaCkI1QC+KfkkNVSt4OLGNI22pTvw6Gm xWXps0TwqLmi5Vd3tan0tf8aUKNNf21OAvgFGKIxnifu3+6X4AjYJIihOGFemDuaIdQa Rc6aWasl7eS0a0A5ke0aT/6VcCI4xs5+qso7QOGAoaY21bNg67G8efv3Kg/7+eA5DmuK O5DAD2MBOziD3YPC6i3sn/EZSxhIwaS5BVJEEZ2I3l4PPCgzjnyPr2JMCX+po1vsTdKy xyzn7m6nYBtNSI1QUhChu/xKP+UFTvi6IEQG1KOLRRIMNkhRYkUhvMIkpVsmE9m2Jjl2 EDBQ== X-Gm-Message-State: APjAAAWplDTcoP2b4gqBxh1bdHQJEWYLMTxoHS6eWNiZiQCyzZXcJPdS 3W7dDil+Fmo2g+6v9F68ezA= X-Received: by 2002:a5d:6a02:: with SMTP id m2mr89588140wru.52.1578133478872; Sat, 04 Jan 2020 02:24:38 -0800 (PST) Received: from pali ([2a02:2b88:2:1::5cc6:2f]) by smtp.gmail.com with ESMTPSA id r68sm14218257wmr.43.2020.01.04.02.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jan 2020 02:24:37 -0800 (PST) Date: Sat, 4 Jan 2020 11:24:36 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Marcel Holtmann Cc: linux-bluetooth@vger.kernel.org Subject: Re: OCF_READ_LOCAL_CODECS is permitted only for root user Message-ID: <20200104102436.bhqagqrfwupj6hkm@pali> References: <20191228171212.56anj4d4kvjeqhms@pali> <45BB2908-4E16-4C74-9DB4-8BAD93B42A21@holtmann.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="s3jd55xdtax57j72" Content-Disposition: inline In-Reply-To: <45BB2908-4E16-4C74-9DB4-8BAD93B42A21@holtmann.org> User-Agent: NeoMutt/20180716 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org --s3jd55xdtax57j72 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Saturday 04 January 2020 10:44:52 Marcel Holtmann wrote: > Hi Pali, >=20 > > I wrote a simple script "sco_features.pl" which show all supported > > codecs by local HCI bluetooth adapter. Script is available at: > >=20 > > https://github.com/pali/hsphfpd-prototype/blob/prototype/sco_features.pl > >=20 > > And I found out that OCF_READ_LOCAL_CODECS HCI command cannot be send by > > non-root user. Kernel returns "Operation not permitted" error. > >=20 > > 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. > >=20 > > 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. >=20 > actually the direct access to HCI commands is being removed. So we have n= o 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 --=20 Pali Roh=C3=A1r pali.rohar@gmail.com --s3jd55xdtax57j72 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQS4VrIQdKium2krgIWL8Mk9A+RDUgUCXhBn4gAKCRCL8Mk9A+RD UjceAJoDVnOH7VunhYf+tGJ/Z4oyGDtVnwCfZkL3nmPfPICAiYnDD9MVE2BgAwI= =TAum -----END PGP SIGNATURE----- --s3jd55xdtax57j72--