Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2695922ybv; Sun, 9 Feb 2020 05:22:01 -0800 (PST) X-Google-Smtp-Source: APXvYqyXSxapYSasl6rj7w2L5/QpfGuBU54EvlhA8CNGMc75TVjiZ9oTQYko2ktdKk0D7q/uWFFe X-Received: by 2002:a9d:6452:: with SMTP id m18mr6499736otl.366.1581254521110; Sun, 09 Feb 2020 05:22:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581254521; cv=none; d=google.com; s=arc-20160816; b=biqseJ+hl6qk0UNGhDECZUUC+GdO/1n5HN/u6fAxqirXJu7m2bkVbOCbscDfez/f5t L+vtAIFlEI0At6j2deL+5a4jNoPhhr9OPK6CcEkw4VmG7V30k95uIX/9VVOnfVmB1IDD lIOiKJ/ICk22uAvSp0uj72wYbXHXlBGkZ3mBnzgrDrdLfatGCb0kgXelMMJvyJ6DlC2x En8XgSCNcqPshDH60WGWpCAcyjzKuGy6Kqnvwu8FBaylNeHL2KiLxRf8U8Rvcy+ihNj+ FNLNxOeyGCVyq5Qt5nmnBfnWQdfmPqDF8moPy9Chd8PyQ/YsfO9ok0Gq6poYg+5edqGX KItw== 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=viqMTeV8aHU0TNXPkTPu/N167+JygZA4ToYCC2qTqa8=; b=btYdrhFgyQU89c+Ua/Q76BjMEi9H0ayCGuKNYnTaMRE0K2xE7Laqi+Yt5asGwMRcbC rFUykbEel8l1twMiJVWOwpmTWYrN0QTOfJVMMxgzmFlR4PzDzHOUqHI6cFPJHsWIsP2z 5oS2FCoysBmNFwIFh5CKuNU/uVEVclqL2pTu0/RWDTbW17bioii5xvuqjUL7WTXFQ4ff 7vbSH98SmgjeA1ESqUEt5w3HTXsEi9Q4ShfYwl7MXdBk3nhz3D3KG2nk1Pt+J9CnNMoO uHAPHGaOovVLfZDFh91TCWhjk7vObq1CJYiYRCDbWbZBhyNpnFAQ848VzdZQdPuykaut X+hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=orlIVuPF; 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 v21si3590310oie.178.2020.02.09.05.21.49; Sun, 09 Feb 2020 05:22:01 -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=orlIVuPF; 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 S1727514AbgBINVl (ORCPT + 99 others); Sun, 9 Feb 2020 08:21:41 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40430 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727340AbgBINVl (ORCPT ); Sun, 9 Feb 2020 08:21:41 -0500 Received: by mail-wr1-f65.google.com with SMTP id t3so4225922wru.7 for ; Sun, 09 Feb 2020 05:21: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:content-transfer-encoding:in-reply-to :user-agent; bh=viqMTeV8aHU0TNXPkTPu/N167+JygZA4ToYCC2qTqa8=; b=orlIVuPFcwS7WIWf5q7f5VXxCvYM06AoT7mSMgI5UXP9+J38ai10X6Wc2+EXUw+Ynu gFn3+iFXN6iNNf0uXsxpH8QvgvLpzmviHhQVfNgGerDfyJnhKDaCavQQwcp6zLipPoSB uovUiCDvIQtTaA8WYr/UrUvLSQ0C1DSx/NytrASWdFlglJM1Xfldg609y79qB3SIO5px E9MQ7iCfiRj4G33EufGsbanG/FOUei15LPG8LBJtYA1SbWv7L8ks5aeE5tRtQoUKaA36 rrXKbwg4t9ezEjkJMTuOpWKumpYHB8pUxqjW+cEccmvwjCqBrPNX/fOREkupXg3UdVR5 l9iQ== 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:content-transfer-encoding :in-reply-to:user-agent; bh=viqMTeV8aHU0TNXPkTPu/N167+JygZA4ToYCC2qTqa8=; b=O+76s3xy5kkKGcztL2M7evDX0iWT2QpGl197knqPgj2+ZDw9y3B3/OhWRnd1ZGxQf2 WQNNHky+5MqHk5LHKuuEfUoLF0IsWEMCWdqOPS2vNtLpH8xAPASteqVFI08dPdzzKEMK o9+YoHqAhqpRMpBd3migYt+62+nGDUnsgjAuZ9UwRnqfMiYVDPL+zEtKLmmX3aXvqOyO KcGQ6muDipSj9Aa3HSYStfjA8UtlqCc8PoyWPhmXkNHgz+q2x7rm6+OK7Z3wmHbDb1JX FkTqJdGaeDEQ8xz6/WyI3MTLDjMecrlkyvQA+V5ay+kAwqoOe8XxweusvfWGkKj6edAN lBEw== X-Gm-Message-State: APjAAAWGePhJaPshPQE/RlGd05RYtT/RDWKIBAl6U+YG5oBjP0CZp/mC dLVj6bKS5EC4eI7oTOHi6et8kzeD X-Received: by 2002:adf:f283:: with SMTP id k3mr9759837wro.69.1581254498559; Sun, 09 Feb 2020 05:21:38 -0800 (PST) Received: from pali ([2a02:2b88:2:1::5cc6:2f]) by smtp.gmail.com with ESMTPSA id x7sm12021680wrq.41.2020.02.09.05.21.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Feb 2020 05:21:38 -0800 (PST) Date: Sun, 9 Feb 2020 14:21:37 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Marcel Holtmann Cc: linux-bluetooth@vger.kernel.org, David Heidelberg Subject: Re: OCF_READ_LOCAL_CODECS is permitted only for root user Message-ID: <20200209132137.7pi4pgnassosh3ax@pali> References: <20191228171212.56anj4d4kvjeqhms@pali> <45BB2908-4E16-4C74-9DB4-8BAD93B42A21@holtmann.org> <20200104102436.bhqagqrfwupj6hkm@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200104102436.bhqagqrfwupj6hkm@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 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