Skip to content

Topology: Build sof-hda-generic-2ch-pdm1.tplg for PDM1 connected DMIC - #3847

Closed
singalsu wants to merge 1 commit into
thesofproject:masterfrom
singalsu:hda_generic_2ch_setup_pdm1
Closed

singalsu wants to merge 1 commit into
thesofproject:masterfrom
singalsu:hda_generic_2ch_setup_pdm1

Conversation

@singalsu

Copy link
Copy Markdown
Collaborator

This patch addresses issue with device where BIOS reported 2ch DMIC
is not connected to default PDM0 pins but PDM1 pins instead.

Currently there is no known indication of such connection in BIOS so
the created topology needs to be manually copied over
sof-hda-generic-2ch.tplg on the impacted devices.

Signed-off-by: Seppo Ingalsuo seppo.ingalsuo@linux.intel.com

@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.

Looks good. We are looking into runtime logic how we can detect this scenario from NHLT/DMI data and have the kernel load this topology in these cases.

@lgirdwood lgirdwood 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.

@singalsu @kv2019i I assume we are good for v1.7 as a fix ? i.e. nothing is needed in kernel ?

@kv2019i

kv2019i commented Feb 16, 2021

Copy link
Copy Markdown
Collaborator

@lgirdwood We do need kernel support as well, but the FW change can go in first and this enables early adopters to fix their systems by manually overriding the topology (like reported did on thesofproject/linux#2460).

@singalsu

Copy link
Copy Markdown
Collaborator Author

There was a good comment by @plbossart in the linux issue. Though not encountered, to be complete we would be also need sof-hda-generic-1ch-pdm1.tplg. I'll update this PR.

@singalsu
singalsu force-pushed the hda_generic_2ch_setup_pdm1 branch from 575fc77 to ea2a033 Compare February 16, 2021 16:17
@singalsu

singalsu commented Feb 16, 2021 •

Copy link
Copy Markdown
Collaborator Author

@lgirdwood @kv2019i The PR update that I just did only added to CMakeLists.txt build of sof-hda-generic-1ch-pdm1.tplg.

@plbossart

plbossart commented Feb 16, 2021 •

Copy link
Copy Markdown
Member

Could we instead have an IPC change to let the kernel do the PDM0 -> PDM1 change?

This feels like a quick and dirty change, but in the IPC I see this:

uint16_t id;		/**< PDM controller ID */

Could we override this value based on a user selection or kernel parameter?

@singalsu

Copy link
Copy Markdown
Collaborator Author

@plbossart We are seeing this issue now while a kernel based change takes long time to get into disto kernel binaries. Could this topology be released (in 1.7) to have a fix available for impacted devices? The topology could be removed from release when e.g. Ubuntu ships with kernel with this feature.

@plbossart

Copy link
Copy Markdown
Member

@plbossart We are seeing this issue now while a kernel based change takes long time to get into disto kernel binaries. Could this topology be released (in 1.7) to have a fix available for impacted devices? The topology could be removed from release when e.g. Ubuntu ships with kernel with this feature.

You have a point @singalsu, but if we add a quick fix users still need to update their topologies by hand, it's complicated to explain. let's take a couple of days to check if we have an alternative.

@lgirdwood

Copy link
Copy Markdown
Member

@plbossart @singalsu any update here, or shall we wait until after your DMIC call ?

@singalsu

singalsu commented Mar 1, 2021

Copy link
Copy Markdown
Collaborator Author

There will be a kernel option for PDMx forcing later or NHLT blob passing to driver to provide same guidance.

This could be closed or the generated topology build into development topologies. There seems to be a merge conflict as well. Maybe I'll edit this to development and decide a bit later if it should be closed.

This patch addresses issue with device where BIOS reported 2ch DMIC
is not connected to default PDM0 pins but PDM1 pins instead.

Currently there is no known indication of such connection in BIOS so
the created topology needs to be manually copied over
sof-hda-generic-2ch.tplg on the impacted devices. Also a PDM1
connected version of sof-hda-generic-1ch.tplg is built.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu
singalsu force-pushed the hda_generic_2ch_setup_pdm1 branch from ea2a033 to 00d568f Compare March 1, 2021 11:23
@singalsu

singalsu commented Mar 1, 2021

Copy link
Copy Markdown
Collaborator Author

This version builds the topologies for PDM1 connected microphones to development. Let's wait what is the outcome of kernel discussion. The PDMx forcing with kernel option should be quite straightforward. The NHTL blob IPC is maybe something for v1.8.

@lgirdwood

Copy link
Copy Markdown
Member

@singalsu any update ?

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.

4 participants