Skip to content

Tools: Topology2: DMIC: Bug fix 4ch host copier channels count#9368

Merged
kv2019i merged 1 commit intothesofproject:mainfrom
singalsu:tplg2_set_dmic_pcm_channels4_try2
Aug 19, 2024
Merged

Tools: Topology2: DMIC: Bug fix 4ch host copier channels count#9368
kv2019i merged 1 commit intothesofproject:mainfrom
singalsu:tplg2_set_dmic_pcm_channels4_try2

Conversation

@singalsu
Copy link
Collaborator

The NUM_DMICS=4 controls DAI channels count, while recently added DMIC0_PCM_CHANNELS controls host copier channels count. But in most topologies built the DMIC0_PCM_CHANNELS remained in default 2 setting if it was not set in cmake target definitions.

As result the "arecord -c 4" attempt failed e.g. with common sof-hda-generic-4ch.tplg.

Fixes: 8836612 ("Tools: Topology2:
Add DMIC Enhanced Audio Capture development tplg")

@singalsu singalsu requested review from kv2019i and lgirdwood August 15, 2024 18:30
Copy link
Collaborator

@ranj063 ranj063 left a comment

Choose a reason for hiding this comment

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

LGTM

@singalsu singalsu marked this pull request as ready for review August 16, 2024 06:06
@singalsu singalsu requested a review from jsarha as a code owner August 16, 2024 06:06
@singalsu singalsu requested review from lyakh and ujfalusi August 16, 2024 06:13
This patch fixes a recently introduced bug that impacts most
of 4ch DMIC topologies.

The NUM_DMICS=4 controls DAI channels count, while the
DMIC0_PCM_CHANNELS controls host copier channels count. In
most topologies built the DMIC0_PCM_CHANNELS remained in
default 2 setting if it was not explicitly set in cmake target
definitions.

As result the "arecord -c 4" attempt failed e.g. with common
sof-hda-generic-4ch.tplg.

Fixes: 8836612 ("Tools: Topology2:
       Add DMIC Enhanced Audio Capture development tplg")

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu singalsu force-pushed the tplg2_set_dmic_pcm_channels4_try2 branch from 623480d to b691d00 Compare August 16, 2024 10:21
@singalsu singalsu requested a review from ujfalusi August 16, 2024 10:22
Copy link
Contributor

@ujfalusi ujfalusi left a comment

Choose a reason for hiding this comment

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

I find this version easier to follow and be more pragmatic, thanks.

It would have been nicer if a we could be able to use a define for the define, but it is a language limitation.

@singalsu
Copy link
Collaborator Author

The jenkins failures do not look related https://sof-ci.01.org/sofpr/PR9368/build7078/devicetest/index.html

DMIC0_PCM_CHANNELS 2

# Note: This will be redefined in dmic-generic.conf if not set from cmake
DMIC0_PCM_CHANNELS 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess a naive

    DMIC0_PCM_CHANNELS NUM_DMICS

wouldn't work?

Copy link
Contributor

Choose a reason for hiding this comment

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

that was my initial proposal (#9368 (comment)) but it looks like the language does not accept it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, it's not possible (DMIC0_PCM_CHANNELS $NUM_DMICS).

@singalsu singalsu requested a review from lyakh August 19, 2024 11:41
@kv2019i kv2019i merged commit dea518e into thesofproject:main Aug 19, 2024
@singalsu singalsu deleted the tplg2_set_dmic_pcm_channels4_try2 branch August 21, 2024 08:00
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