zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.95k stars 6.66k forks source link

Add bluedroid SBC encoder/decoder to Zephyr as an external library #67705

Open MarkWangChinese opened 10 months ago

MarkWangChinese commented 10 months ago

Origin

The Android bluedroid SBC https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/refs/heads/main/embdrv/sbc

Purpose

The codes implement the encoder and decoder of SBC. I am implementing the A2DP(https://github.com/zephyrproject-rtos/zephyr/pull/31583) in Zephyr, A2DP has mandatory needs for SBC.

Mode of integration

This would be a Zephyr module with libsbc as the name. In the pr (https://github.com/zephyrproject-rtos/zephyr/pull/70531), I am using the name libsbc like liblc3. You can change it's name if needed. I will do very limited codes changes and add one porting file based on bluedroid codes to pass building.

Maintainership

Maintainers - @MarkWangChinese It's OK to add new people, please let me know.

Pull Request

The temporary pr that uses the SBC is https://github.com/zephyrproject-rtos/zephyr/pull/70531 Because the repo is temporary, so the pr is temporary too.

Description

In order to support A2DP in Zephyr, we need to have the SBC encoder and decoder because it is mandatory for A2DP. Android bluedroid maintain it, so Zephyr can take advantage of it. It's license is Apache2.0 I am implementing one middle layer libsbc/sbc.c that is in line with zephyr's style and used in Zephyr. it calls the bluedroid SBC.

Dependencies

It is only used by A2DP now.

Revision

I create one temporary repository https://github.com/MarkWangChinese/libsbc for review.

License

Apache License, Version 2.0 For example: the license of https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/refs/heads/main/embdrv/sbc/encoder/srce/sbc_encoder.c is as follow:

/******************************************************************************
 *
 *  Copyright (C) 1999-2012 Broadcom Corporation
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at:
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 ******************************************************************************/
nashif commented 10 months ago

I will wait it is approved and the repository is created, then I can push the codes and create PR.

It would help us make a decision if there is a draft PR that shows how this will be integrated.

MarkWangChinese commented 9 months ago

I create one repository as https://github.com/MarkWangChinese/libsbc, please help to check. The pr that uses the SBC is https://github.com/zephyrproject-rtos/zephyr/pull/70531 (split the SBC codec PR from the Bluetooth A2DP PR, it is now an independent PR). In this pr's modules/libsbc path, data_types.h is one Bluedroid SBC porting file to pass building, sbc.c implements the new SBC interfaces that is more suitable for zephyr, the sbc.h is put include/zephyr/libsbc/sbc.h.

dleach02 commented 7 months ago

@nashif, see #70531 as a reference.

We would like to get things setup. It is unclear to me if we actually voted on this in the TSC or not but I do remember multiple discussions. What should the next steps be?

ping @carlescufi

dleach02 commented 5 months ago

@nashif @carlescufi

The TSC notes said we were waiting on a PR reference. @MarkWangChinese posted one so need to figure out what we need to do next to get this moving.

nashif commented 5 months ago

@nashif @carlescufi

The TSC notes said we were waiting on a PR reference. @MarkWangChinese posted one so need to figure out what we need to do next to get this moving.

the PR needs to be referenced i nthis issue, there is a section dedicated to that.

MarkWangChinese commented 5 months ago

@nashif @carlescufi The TSC notes said we were waiting on a PR reference. @MarkWangChinese posted one so need to figure out what we need to do next to get this moving.

the PR needs to be referenced i nthis issue, there is a section dedicated to that.

The issue description is updated, please help to check.

github-actions[bot] commented 3 months ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

dleach02 commented 3 months ago

@nashif What do we need to do next on this?

github-actions[bot] commented 1 month ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

mmahadevan108 commented 4 weeks ago

@dleach02 @nashif I have removed the Stale Label. Has this been discussed in the TSC