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 -- Pali Rohár pali.rohar@xxxxxxxxx
Attachment:
signature.asc
Description: PGP signature