Skip to content

topology1: add support for cs42l42-sdw - #8370

Closed
davidrau-renesas-opensource wants to merge 1 commit into
thesofproject:mainfrom
davidrau-renesas-opensource:main
Closed

davidrau-renesas-opensource wants to merge 1 commit into
thesofproject:mainfrom
davidrau-renesas-opensource:main

Conversation

@davidrau-renesas-opensource

Copy link
Copy Markdown

Adding support for cs42l42 via SoundWire

Adding support for cs42l42 via SoundWire

Signed-off-by: David Rau <David.Rau.opensource@dm.renesas.com>
@sofci

sofci commented Oct 23, 2023

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

reply test this please to run this test once

@davidrau-renesas-opensource

davidrau-renesas-opensource commented Oct 23, 2023 via email •

Copy link
Copy Markdown
Author

1 similar comment
@lgirdwood

Copy link
Copy Markdown
Member

test this please

@kv2019i kv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks you @davidrau-renesas-opensource for the submission. One minor note, but a bigger ask is that can you submit this against the stable-v2.2 branch (make a pull-request to this branch). We have dropped topology1 support for Intel platforms from SOF mainline, and support for topology1 TGL/ADL platforms is now done in the stable-v2.2 branch.

@@ -0,0 +1,286 @@
#
# Topology for Tigerlake with rt711 + rt1308 (x2).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment needs to be updated.

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking with "request changes" until we agree about what's missing in existing topologies first.

#
# Topology for Tigerlake with rt711 + rt1308 (x2).
#

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is there a need to create a new topology just to support a new headset codec?

Put differently, why not use the existing topology or describe what's missing?

Topology files are a PITA to maintain, less is more really.

@davidrau-renesas-opensource davidrau-renesas-opensource Oct 24, 2023 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestions.
These modifications I did is a temproary solution to enable CS42L42 codec in ADL platform.

Topology files are a PITA to maintain, less is more really.

Agreed with you. :)


# PCM Low Latency, id 0
dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
PCM_PLAYBACK_ADD(CS42L42 Jack Out, 0, PIPELINE_PCM_30)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why redefine names? What was wrong with just 'Jack Out' which is used by all existing solutions?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood.

@plbossart

Copy link
Copy Markdown
Member

@davidrau-renesas-opensource it wouldn't hurt if you introduced a bit more the problem you are trying to solve and in which environment. We are not really aware of any ADL platform based on CS42L42?

@davidrau-renesas-opensource

Copy link
Copy Markdown
Author

@davidrau-renesas-opensource it wouldn't hurt if you introduced a bit more the problem you are trying to solve and in which environment. We are not really aware of any ADL platform based on CS42L42?

Here is the story.
Previously, I purchased a development board (Alder-Lake) to study how SoundWire interface work with the audio codec.
And the onboard codec is CS42L42-SDW that not supported by SOF as before.
I reached out SOF community and got support from the maintainer about how to add ACPI table, modify SOF driver and tplg file.

After such modificatins, I can verify the playback function and then push this tplg file that the maintainer asked.

@lgirdwood

Copy link
Copy Markdown
Member

Glad its working for you now @davidrau-renesas-opensource, did you say what SOF version you are using? Is it v2.2 with IPC3 or v2.3+ with IPC4 ? as this determines what we need to upstream as some features are being deprecated. Thanks

@davidrau-renesas-opensource

Copy link
Copy Markdown
Author

Glad its working for you now @davidrau-renesas-opensource, did you say what SOF version you are using? Is it v2.2 with IPC3 or v2.3+ with IPC4 ? as this determines what we need to upstream as some features are being deprecated. Thanks

@lgirdwood
Thanks for the kind support always.
According to the system log in my dev-kit, the SOF mechanism bases on IPC3
[ 16.171548] snd_sof:sof_ipc3_fw_parse_ext_man: sof-audio-pci-intel-tgl 0000:00:1f.3: found sof_ext_man header type 1 size 0x1a0
[ 16.171550] snd_sof:sof_ipc3_fw_parse_ext_man: sof-audio-pci-intel-tgl 0000:00:1f.3: found sof_ext_man header type 6 size 0x20
[ 16.171552] snd_sof:sof_ipc3_fw_parse_ext_man: sof-audio-pci-intel-tgl 0000:00:1f.3: found sof_ext_man header type 0 size 0x50
[ 16.171556] snd_sof:sof_ipc3_fw_parse_ext_man: sof-audio-pci-intel-tgl 0000:00:1f.3: found sof_ext_man header type 2 size 0x70
[ 16.171557] snd_sof:sof_ipc3_get_cc_info: sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: used compiler XCC 12:0:8 <RG-2017.8-linux> used optimization flags -O2

And I clone SOF repository from your Github to create this tplg source file for CS42L42.
The version info of SOF repository is "2.7.99" (main branch)

Thanks.

@kv2019i

kv2019i commented Nov 14, 2023

Copy link
Copy Markdown
Collaborator

@davidrau-renesas-opensource Can you submit a pull req with this commit o stable-v2.2 branch? It has the latest tools/topology1 so this PR should apply cleanly on top of it.

@davidrau-renesas-opensource

Copy link
Copy Markdown
Author

@davidrau-renesas-opensource Can you submit a pull req with this commit o stable-v2.2 branch? It has the latest tools/topology1 so this PR should apply cleanly on top of it.

@kv2019i Thanks for your suggestions. :)
I will switch to stable-v2.2 branch and pull req with my commit as soon.

@davidrau-renesas-opensource davidrau-renesas-opensource closed this by deleting the head repository Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants