2023-03-10 18:42:19

by Ajye Huang

[permalink] [raw]
Subject: [PATCH v1] ASoC: Intel: sof_rt5682: Enable Bluetooth offload on adl_rt1019_rt5682

Enable Bluetooth audio offload for drv_name "adl_rt1019_rt5682" with
following board configuration specifically:

SSP0 - rt5682 Headset
SSP1 - alc1019p speaker amp
SSP2 - Bluetooth audio

Signed-off-by: Ajye Huang <[email protected]>
Signed-off-by: Mac Chiang <[email protected]>
---
sound/soc/intel/boards/sof_rt5682.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
index 4fe448295a90..2eec32846078 100644
--- a/sound/soc/intel/boards/sof_rt5682.c
+++ b/sound/soc/intel/boards/sof_rt5682.c
@@ -1109,7 +1109,9 @@ static const struct platform_device_id board_ids[] = {
SOF_SPEAKER_AMP_PRESENT |
SOF_RT1019_SPEAKER_AMP_PRESENT |
SOF_RT5682_SSP_AMP(1) |
- SOF_RT5682_NUM_HDMIDEV(4)),
+ SOF_RT5682_NUM_HDMIDEV(4) |
+ SOF_BT_OFFLOAD_SSP(2) |
+ SOF_SSP_BT_OFFLOAD_PRESENT),
},
{
.name = "mtl_mx98357_rt5682",
--
2.25.1



2023-03-10 18:48:17

by Pierre-Louis Bossart

[permalink] [raw]
Subject: Re: [PATCH v1] ASoC: Intel: sof_rt5682: Enable Bluetooth offload on adl_rt1019_rt5682



On 3/10/23 12:42, Ajye Huang wrote:
> Enable Bluetooth audio offload for drv_name "adl_rt1019_rt5682" with
> following board configuration specifically:
>
> SSP0 - rt5682 Headset
> SSP1 - alc1019p speaker amp
> SSP2 - Bluetooth audio
>
> Signed-off-by: Ajye Huang <[email protected]>
> Signed-off-by: Mac Chiang <[email protected]>
> ---
> sound/soc/intel/boards/sof_rt5682.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
> index 4fe448295a90..2eec32846078 100644
> --- a/sound/soc/intel/boards/sof_rt5682.c
> +++ b/sound/soc/intel/boards/sof_rt5682.c
> @@ -1109,7 +1109,9 @@ static const struct platform_device_id board_ids[] = {
> SOF_SPEAKER_AMP_PRESENT |
> SOF_RT1019_SPEAKER_AMP_PRESENT |
> SOF_RT5682_SSP_AMP(1) |
> - SOF_RT5682_NUM_HDMIDEV(4)),
> + SOF_RT5682_NUM_HDMIDEV(4) |
> + SOF_BT_OFFLOAD_SSP(2) |
> + SOF_SSP_BT_OFFLOAD_PRESENT),

This sounds good, but if the intent is to have BT offload enabled across
all ADL skews there are still misses, e.g.

.name = "adl_mx98357_rt5682",

Can we please try to add this BT offload in a more consistent manner, or
add a comment when this is officially not planned/supported?

2023-03-10 20:01:48

by Ajye Huang

[permalink] [raw]
Subject: Re: [PATCH v1] ASoC: Intel: sof_rt5682: Enable Bluetooth offload on adl_rt1019_rt5682

On Sat, Mar 11, 2023 at 2:48 AM Pierre-Louis Bossart
<[email protected]> wrote:
>
> This sounds good, but if the intent is to have BT offload enabled across
> all ADL skews there are still misses, e.g.
>
> .name = "adl_mx98357_rt5682",
>
> Can we please try to add this BT offload in a more consistent manner, or
> add a comment when this is officially not planned/supported?

Hi Pierre,

The "sof-adl-rt1019-rt5682.tplg" for this "adl_rt1019_rt5682" sound
card also need to enable bt_offload, this one I will submit to SOF
later this weekend.
ex, topology: sof-adl-rt1019-rt5682: add bluetooth offload uses SSP2
link -- https://github.com/ajye-huang/sof/commit/09dcbc3cc1617df652944299c63082f1936dea6e

To be more clear, I think we can add a comment in the commit message
for mention " The related "sof-adl-rt1019-rt5682.tplg" enabled the
bt_offload feature", is it ok?

2023-03-10 22:46:25

by Pierre-Louis Bossart

[permalink] [raw]
Subject: Re: [PATCH v1] ASoC: Intel: sof_rt5682: Enable Bluetooth offload on adl_rt1019_rt5682



On 3/10/23 14:01, Ajye Huang wrote:
> On Sat, Mar 11, 2023 at 2:48 AM Pierre-Louis Bossart
> <[email protected]> wrote:
>>
>> This sounds good, but if the intent is to have BT offload enabled across
>> all ADL skews there are still misses, e.g.
>>
>> .name = "adl_mx98357_rt5682",
>>
>> Can we please try to add this BT offload in a more consistent manner, or
>> add a comment when this is officially not planned/supported?
>
> Hi Pierre,
>
> The "sof-adl-rt1019-rt5682.tplg" for this "adl_rt1019_rt5682" sound
> card also need to enable bt_offload, this one I will submit to SOF
> later this weekend.
> ex, topology: sof-adl-rt1019-rt5682: add bluetooth offload uses SSP2
> link -- https://github.com/ajye-huang/sof/commit/09dcbc3cc1617df652944299c63082f1936dea6e
>
> To be more clear, I think we can add a comment in the commit message
> for mention " The related "sof-adl-rt1019-rt5682.tplg" enabled the
> bt_offload feature", is it ok?

It's best if you provide a series that enables BT offload across the
board for ADL, if that's the intended goal.

2023-03-10 23:55:40

by Ajye Huang

[permalink] [raw]
Subject: Re: [PATCH v1] ASoC: Intel: sof_rt5682: Enable Bluetooth offload on adl_rt1019_rt5682

On Sat, Mar 11, 2023 at 6:46 AM Pierre-Louis Bossart
<[email protected]> wrote:
>

> It's best if you provide a series that enables BT offload across the
> board for ADL, if that's the intended goal.
Hi Pierre,

{ .name = "adl_mx98357_rt5682",
.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
SOF_RT5682_SSP_CODEC(0) |
SOF_SPEAKER_AMP_PRESENT |
SOF_RT5682_SSP_AMP(2) |
SOF_RT5682_NUM_HDMIDEV(4)),
},
The "adl_mx98357_rt5682" is the sound card of the google "Brya" Board project.
Because the SSP2 is used for the max98357 amplifier, so SSP2
bt_offload can't be enabled at the drv_name "adl_mx98357_rt5682".
(The hardway layout I2S port2 connected to max98357 amplifier)

The other adl projects that enabled the bt_offload feature were
designed with ssp1 for amp, ssp2 for bt_offload based on pins
definition.
{
.name = "adl_rt1019_rt5682",
.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
SOF_RT5682_SSP_CODEC(0) |
SOF_SPEAKER_AMP_PRESENT |
SOF_RT1019_SPEAKER_AMP_PRESENT |
SOF_RT5682_SSP_AMP(1) |
SOF_RT5682_NUM_HDMIDEV(4) |
SOF_BT_OFFLOAD_SSP(2) |
SOF_SSP_BT_OFFLOAD_PRESENT),
},
thanks

2023-03-13 17:49:40

by Pierre-Louis Bossart

[permalink] [raw]
Subject: Re: [PATCH v1] ASoC: Intel: sof_rt5682: Enable Bluetooth offload on adl_rt1019_rt5682



On 3/10/23 17:55, Ajye Huang wrote:
> On Sat, Mar 11, 2023 at 6:46 AM Pierre-Louis Bossart
> <[email protected]> wrote:
>>
>
>> It's best if you provide a series that enables BT offload across the
>> board for ADL, if that's the intended goal.
> Hi Pierre,
>
> { .name = "adl_mx98357_rt5682",
> .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
> SOF_RT5682_SSP_CODEC(0) |
> SOF_SPEAKER_AMP_PRESENT |
> SOF_RT5682_SSP_AMP(2) |
> SOF_RT5682_NUM_HDMIDEV(4)),
> },
> The "adl_mx98357_rt5682" is the sound card of the google "Brya" Board project.
> Because the SSP2 is used for the max98357 amplifier, so SSP2
> bt_offload can't be enabled at the drv_name "adl_mx98357_rt5682".
> (The hardway layout I2S port2 connected to max98357 amplifier)
>
> The other adl projects that enabled the bt_offload feature were
> designed with ssp1 for amp, ssp2 for bt_offload based on pins
> definition.
> {
> .name = "adl_rt1019_rt5682",
> .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
> SOF_RT5682_SSP_CODEC(0) |
> SOF_SPEAKER_AMP_PRESENT |
> SOF_RT1019_SPEAKER_AMP_PRESENT |
> SOF_RT5682_SSP_AMP(1) |
> SOF_RT5682_NUM_HDMIDEV(4) |
> SOF_BT_OFFLOAD_SSP(2) |
> SOF_SSP_BT_OFFLOAD_PRESENT),
> },

ok, so for this patch:

Acked-by: Pierre-Louis Bossart <[email protected]>

I accept the argument that when SSP2 is used for the amplifier then it
can't be used for BT offload, but I still find "mtl_mx98360_rt5682"
missing BT offload. This would need a follow-up patch or a comment if
this miss was intentional (not formally supported).


2023-03-14 15:13:15

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v1] ASoC: Intel: sof_rt5682: Enable Bluetooth offload on adl_rt1019_rt5682

On Sat, 11 Mar 2023 02:42:01 +0800, Ajye Huang wrote:
> Enable Bluetooth audio offload for drv_name "adl_rt1019_rt5682" with
> following board configuration specifically:
>
> SSP0 - rt5682 Headset
> SSP1 - alc1019p speaker amp
> SSP2 - Bluetooth audio
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: Intel: sof_rt5682: Enable Bluetooth offload on adl_rt1019_rt5682
commit: 12e3b2848bfa8197062b7989eefb7c081d372fb8

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark