-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
topology: fix bad parameters in generic dmic dai add #2089
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments below
@@ -46,14 +46,14 @@ dnl deadline, priority, core, time_domain) | |||
DAI_ADD(sof/pipe-dai-capture.m4, | |||
DMIC_PIPELINE_48k_ID, DMIC, 0, dmic01, | |||
concat(`PIPELINE_SINK_', DMIC_PIPELINE_48k_ID), 2, s32le, | |||
1000, 0, 0, 48000, 48000, 48000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those parameters are obviously wrong, but shouldn't we use the TIMER now?
The DMIC is clock master so there's no real benefit in using DMA interrupts here, is there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, ok someone needs to jump in here, because I don't know this area.... maybe before the wrong value 16000 something has been just interpreted as != 0 -> so timer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tlauda @lgirdwood see above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@juimonen these are wrong, please validate against the DAI_ADD defn. It looks like we are also missing some macro defs for Time domain, these can be added too in order to avoid ambiguous definitions.
dnl DAI_ADD(pipeline,
dnl pipe id, dai type, dai_index, dai_be,
dnl buffer, periods, format,
dnl period , priority, core, time_domain)
define(`DAI_ADD',
`undefine(`PIPELINE_ID')'
`undefine(`DAI_TYPE')'
`undefine(`DAI_INDEX')'
`undefine(`DAI_BE')'
`undefine(`DAI_BUF')'
`undefine(`DAI_PERIODS')'
`undefine(`DAI_FORMAT')'
`undefine(`SCHEDULE_PERIOD')'
`undefine(`SCHEDULE_PRIORITY')'
`undefine(`SCHEDULE_CORE')'
`undefine(`SCHEDULE_TIME_DOMAIN')'
`define(`PIPELINE_ID', $2)'
`define(`DAI_TYPE', STR($3))'
`define(`DAI_INDEX', STR($4))'
`define(`DAI_BE', $5)'
`define(`DAI_BUF', $6)'
`define(`DAI_NAME', $3$4)'
`define(`DAI_PERIODS', $7)'
`define(`DAI_FORMAT', $8)'
`define(`SCHEDULE_PERIOD', $9)'
`define(`SCHEDULE_PRIORITY', $10)'
`define(`SCHEDULE_CORE', $11)'
`define(`SCHEDULE_TIME_DOMAIN', $12)'
`include($1)'
`DEBUG_DAI($3, $4)'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgirdwood Pierre's questions was should this be TIMER or DMA...? And I guess it is TIMER as I see only that defined anywhere. And then I see DAI_ADD macros without either TIMER or DMA that compiles to "" in conf files, which is alsp probably not good.... So should those then be DMA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and forget last comment about not using, was not grepping for tokens... so question is should the empty "" be DOMAIN_DMA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in below topologies the TIME_DOMAIN is not specified so it is "":
sof-cht-max98090.m4
sof-cht-nocodec.m4
sof-cht-rt5682.m4
sof-imx8qxp-nocodec.m4
sof-imx8qxp-nocodec-sai.m4
sof-imx8qxp-cs42888.m4
sof-imx8qxp-wm8960.m4
sof-hsw-rt5640.m4
sof-bdw-codec.m4
sof-cht-src-50khz-pcm512x.m4
platform/intel/intel-generic-dmic.m4
sof-byt-codec.m4
Any objections I just change it to TIMER in all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@juimonen The imx8qxp ones are 100% DMA-driven, so TIMER might/will break them. No words on the other ones though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@juimonen all topologies use the SOC clock master so there's no problem using the TIMER
the two cases where the codec is master is wm8804 and some versions of pcm512x, those would need to remain DMA based.
In general when the DAI uses 'codec_slave' we can use the TIMER.
sof-apl-wm8804.m4: SSP_CLOCK(bclk, 3072000, codec_master),
sof-apl-wm8804.m4: SSP_CLOCK(fsync, 48000, codec_master),
sof-imx8qxp-wm8960.m4: SAI_CLOCK(bclk, 3072000, codec_master),
sof-imx8qxp-wm8960.m4: SAI_CLOCK(fsync, 48000, codec_master),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tlauda any comment here ?
be48808
to
614b5ec
Compare
@plbossart @paulstelian97 thanks for the info and PR updated. All imx ones should have DMA domain now. I now explicitly defined either TIMER or DMA everywhere. I also found couple of related issues which are separate commits... I have no idea how those topologies have ever worked with all pipelines. |
614b5ec
to
68c35f5
Compare
@juimonen Would you mind splitting up the commit per tplg file? It is easy to figure out which commit caused issues when debugging that way |
a2fbe54
to
179d639
Compare
@ranj063 @plbossart @paulstelian97 PR now divided per topology file basis. @plbossart I needed to change byt and cht based topology timers to DMA, because CI just went crazy otherwise... |
179d639
to
7ed5cc7
Compare
@paulstelian97 updated, hope it is more clear now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, looks good to me now.
yes, my baytrail device went in the weeds with your PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep broadwell the way it is and remove haswell
tools/topology/sof-bdw-codec.m4
Outdated
|
||
# capture DAI is SSP0 using 2 periods | ||
# Buffers use s24le format, 1000us deadline on core 0 with priority 0 | ||
DAI_ADD(sof/pipe-dai-capture.m4, | ||
2, SSP, 0, Codec, | ||
PIPELINE_SINK_2, 2, s24le, | ||
1000, 0, 0) | ||
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably better to keep DMAs on broadwell, this is difficult enough with DMAs alone and IIRC there are no external timers?
tools/topology/sof-hsw-rt5640.m4
Outdated
|
||
# capture DAI is SSP0 using 2 periods | ||
# Buffers use s24le format, 1000us deadline on core 0 with priority 0 | ||
DAI_ADD(sof/pipe-dai-capture.m4, | ||
2, SSP, 0, Codec, | ||
PIPELINE_SINK_2, 2, s24le, | ||
1000, 0, 0) | ||
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep as DMA.
we need to remove this topology anyways, hsw is not supported
8000, 96000, 48000) | ||
8000, 96000, 48000, | ||
SCHEDULE_TIME_DOMAIN_TIMER, | ||
PIPELINE_PLAYBACK_SCHED_COMP_1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leave broadwell with DMA
tools/topology/sof-hsw-rt5640.m4
Outdated
8000, 96000, 48000) | ||
8000, 96000, 48000, | ||
SCHEDULE_TIME_DOMAIN_TIMER, | ||
PIPELINE_PLAYBACK_SCHED_COMP_1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this file, not supported
Fix errorneous parameters in DAI_ADD. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD and pipeline. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD and pipeline. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
sof-cml-rt5682 dmic definition has some extra parameters that should be removed. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Media pipe is missing the scheduling component, so move it after the dai definition and add the scheduling component. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Remove as unsupported platform. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
6ed3d9a
to
5bf2207
Compare
5bf2207
to
6882461
Compare
@plbossart updated. bdw changed to dma, hsw removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @juimonen
Internal CI test passed - all green. |
Intel generic dmic pipelines have bad extra parameters in
their dai add macros, so remove them.
Signed-off-by: Jaska Uimonen jaska.uimonen@intel.com