Skip to content

topology2: set DMIC0 pcm id to 6 - #6904

Merged
kv2019i merged 3 commits into
thesofproject:mainfrom
libinyang:DMIC_PCMID
Feb 3, 2023
Merged

kv2019i merged 3 commits into
thesofproject:mainfrom
libinyang:DMIC_PCMID

Conversation

@libinyang

@libinyang libinyang commented Jan 3, 2023 •

Copy link
Copy Markdown
Contributor

UCM requires DMIC PCM ID to be 6.
Fixes: #4068
Signed-off-by: Libin Yang libin.yang@intel.com

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.

No, this needs to be a parameter, we use the same file from multiple places

cavs-nocodec.conf:      "[1-4]" "platform/intel/dmic-generic.conf"
cavs-rt5682.conf:       "[1-4]" "platform/intel/dmic-generic.conf"
cavs-sdw.conf:"[1-4]" "platform/intel/dmic-generic.conf"
cavs-sdw.conf:"1" "platform/intel/sdw-dmic-generic.conf"
sof-hda-generic.conf:   "[1-4]" "platform/intel/dmic-generic.conf"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@plbossart Thanks for the suggestion. I will refine the patch by using a parameter based on the UCM for each mode.

@libinyang

Copy link
Copy Markdown
Contributor Author

v2 update:
use DMIC0_PCM_ID for dmic0 pcm id setting.

@libinyang

Copy link
Copy Markdown
Contributor Author

This PR depends on #6787. Without #6787, sof hda will fail to create the snd card because of the conflict between HDMI PCM ID and DMIC0 PCM ID, which are both 6.

@lgirdwood

Copy link
Copy Markdown
Member

This PR depends on #6787. Without #6787, sof hda will fail to create the snd card because of the conflict between HDMI PCM ID and DMIC0 PCM ID, which are both 6.

#6787 now pending final approval from @ranj063

@mengdonglin

mengdonglin commented Jan 13, 2023 •

Copy link
Copy Markdown
Collaborator

@plbossart @ranj063 Can you please check if this PR can be merged? It depends on #6787 that has been merged.

@libinyang

libinyang commented Jan 17, 2023 •

Copy link
Copy Markdown
Contributor Author

#6787 is merged, but there are some more discussions in #6953. Let's wait for the final conclusion.

@lgirdwood

Copy link
Copy Markdown
Member

#6787 is merged, but there are some more discussions in #6953. Let's wait for the final conclusion.

#6953 closed. @libinyang @bardliao @kv2019i whats the next move now ?

@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. There's a conflict now though, so needs an update.

@libinyang

Copy link
Copy Markdown
Contributor Author

Patches update

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

@plbossart changes good now ?

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

sounds incomplete to me. I am pretty sure the device 10 is not right for cavs-sdw topologies

Comment thread tools/topology/topology2/platform/intel/dmic-default.conf Outdated
@ranj063

ranj063 commented Jan 30, 2023

Copy link
Copy Markdown
Collaborator

sounds incomplete to me. I am pretty sure the device 10 is not right for cavs-sdw topologies

@plbossart this may be incomplete but it doesnt make the existing topologies any worse right? We're currently setting 10 for all PCM IDs for all topologies. At least the HDA ones are fixed with this one

@plbossart

plbossart commented Jan 30, 2023 •

Copy link
Copy Markdown
Member

sounds incomplete to me. I am pretty sure the device 10 is not right for cavs-sdw topologies

@plbossart this may be incomplete but it doesnt make the existing topologies any worse right? We're currently setting 10 for all PCM IDs for all topologies. At least the HDA ones are fixed with this one

what the point of doing things one step at a time, apart from wasting reviewer time?
This is a shared module, so we do things right. I don't want to review this multiple times.

Edit: I provided the SAME feedback last month in #6904 (comment). Seriously?

@libinyang

Copy link
Copy Markdown
Contributor Author

what the point of doing things one step at a time, apart from wasting reviewer time? This is a shared module, so we do things right. I don't want to review this multiple times.

Edit: I provided the SAME feedback last month in #6904 (comment). Seriously?

@plbossart We have a rule for the DMIC0 PCM ID described in #6783. The DMIC0 PCM ID should be 10.
For the below topologies, I checked: what PCMID is set in topology1, what UCM requires the DMIC0 PCMID to be.

  1. cavs-nocodec-bt.conf:
    There seems no counterpart in topology1 and no special requirement from UCM.
  2. cavs-nocodec.conf
    The PCMID is 10 in topology1 and no special requirement from UCM.
  3. cavs-rt5682.conf
    The PCMID is 99 in topology1 (We should not use 99 anymore, I think) and no special requirement from UCM.
  4. cavs-sdw.conf
    The PCMID is 10 and UCM2 can accept any PCMID for sof-soundwire card (no special requirement from UCM).
  5. sof-hda-generic.conf.
    The PCMID is 6 and UCM2 requires PCMID to be 6.

So I think this PR can cover all the scenarios in topology2: set DMIC0 PCMID to 6 only on HDA platform and let other platforms to be 10.

@plbossart

Copy link
Copy Markdown
Member
  1. cavs-rt5682.conf
    The PCMID is 99 in topology1 (We should not use 99 anymore, I think) and no special requirement from UCM.

have you asked the Google/Chrome folks? They use UCM, don't they? @cujomalainey @sathya-nujella
It's not our decision to change the device numbers, and there is nothing in the card name that identifies MTL/topology2/

  1. cavs-sdw.conf
    The PCMID is 10 and UCM2 can accept any PCMID for sof-soundwire card (no special requirement from UCM).

the requirement is this:
CapturePCM "hw:${CardId},${find-device:type=pcm,stream=capture,field=id,regex='DMIC '}"

is this met?

@sathya-nujella

Copy link
Copy Markdown
Contributor
  1. cavs-rt5682.conf
    The PCMID is 99 in topology1 (We should not use 99 anymore, I think) and no special requirement from UCM.

have you asked the Google/Chrome folks? They use UCM, don't they? @cujomalainey @sathya-nujella It's not our decision to change the device numbers, and there is nothing in the card name that identifies MTL/topology2/

Topology1 based Chrome systems are using 99 for DMIC capture. Can you please limit the change to topology2 only if possible?
If it is affecting topology2 only, then from MTL onwards we can update UCM's in Chromium gits accordingly.

@plbossart

Copy link
Copy Markdown
Member
  1. cavs-rt5682.conf
    The PCMID is 99 in topology1 (We should not use 99 anymore, I think) and no special requirement from UCM.

have you asked the Google/Chrome folks? They use UCM, don't they? @cujomalainey @sathya-nujella It's not our decision to change the device numbers, and there is nothing in the card name that identifies MTL/topology2/

Topology1 based Chrome systems are using 99 for DMIC capture. Can you please limit the change to topology2 only if possible? If it is affecting topology2 only, then from MTL onwards we can update UCM's in Chromium gits accordingly.

if we change only for topology2, you won't be able to test this topology on existing TGL chromebooks. I see no value in changing the device number and make integration/testing more complicated. Yes 99 is not a very good number, but it's not worse than 10. It's easier to stick with legacy.

@libinyang

Copy link
Copy Markdown
Contributor Author

Topology1 based Chrome systems are using 99 for DMIC capture. Can you please limit the change to topology2 only if possible? If it is affecting topology2 only, then from MTL onwards we can update UCM's in Chromium gits accordingly.

if we change only for topology2, you won't be able to test this topology on existing TGL chromebooks. I see no value in changing the device number and make integration/testing more complicated. Yes 99 is not a very good number, but it's not worse than 10. It's easier to stick with legacy.

@plbossart @sathya-nujella Thanks for the feedback. I will follow @plbossart 's suggestion and make the DMIC0 PCMID to be 99 for sof-mtl-max98357a-rt5682 platforms on topology2, and topology1 will not be impacted. BTW: Our current rt5682 in tplg2 is used for sof-mtl-max98357a-rt5682 platforms. However, rt5682 can also be used in other combinations, for example, in tplg1, it can be used in sof-cml-rt1011-rt5682 and sof-cml-rt5682-max98357a, and the dmic0 PCMID is 1 on such platforms. To make it more flexible, I will set the DMIC0_PCM_ID=99 in the CMakefile.

the requirement is this:
CapturePCM "hw:${CardId},${find-device:type=pcm,stream=capture,field=id,regex='DMIC '}"

is this met?

Currently, it meets the requirement on our supported tplg2 platforms. But this may be conflicted with DMIC1, for example WoV PCM name. I will have a check and test. If there is conflict, I will fix it in another PR as this is a PCM name issue, not PCM ID.

@libinyang

Copy link
Copy Markdown
Contributor Author

patch updated:

  1. set sof-mtl-max98357a-rt5682 DMIC0 pcm id to 99

@libinyang
libinyang requested a review from plbossart February 1, 2023 07:01
@mengdonglin

Copy link
Copy Markdown
Collaborator

@plbossart @kv2019i @lgirdwood Are we good to merge this PR?

@ranj063

ranj063 commented Feb 2, 2023

Copy link
Copy Markdown
Collaborator

@plbossart @kv2019i @lgirdwood Are we good to merge this PR?

@libinyang @mengdonglin there are conflicts

Different platforms are using the same dmic-generic.conf.
But the DMIC0 PCM ID are different for different platforms. So
let's use parameter DMIC0_PCM_ID for the DMIC0 pcm id setting.

Signed-off-by: Libin Yang <libin.yang@intel.com>
UCM requires sof-hda-generic DMIC0 PCM ID to be 6.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Set sof-mtl-max98357a-rt5682 pcm id to 99 to make it the same in topology1.

Signed-off-by: Libin Yang <libin.yang@intel.com>
@libinyang

Copy link
Copy Markdown
Contributor Author

Patches are updated based on the latest code.

@kv2019i
kv2019i merged commit 9a6b50c into thesofproject:main Feb 3, 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.

[BUG] DSP panic problem in ASRC component

8 participants