Skip to content

topology: fix virtual widget warnings - #803

Merged
lgirdwood merged 1 commit into
thesofproject:masterfrom
xun2z:issue-474
Jan 14, 2019
Merged

lgirdwood merged 1 commit into
thesofproject:masterfrom
xun2z:issue-474

Conversation

@xun2z

@xun2z xun2z commented Jan 9, 2019

Copy link
Copy Markdown
Collaborator

add some widgets to prevent kernel warnings generated by the machine
driver.

Signed-off-by: Xun Zhang xun2.zhang@intel.com

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

@xiulipan @ranj063 please review.

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

is this enough? other examples have e.g. "ssp5 Tx", so wondering if all warnings are removed. Can you provide a dmesg log showing that this actually works for rt5651 (the rest should be identical).

@plbossart

Copy link
Copy Markdown
Member

You are missing widgets in for bytcr_rt5640

diff --git a/tools/topology/sof-byt-rt5640.m4 b/tools/topology/sof-byt-rt5640.m4
index 5e6cb049..cba24f29 100644
--- a/tools/topology/sof-byt-rt5640.m4
+++ b/tools/topology/sof-byt-rt5640.m4
@@ -97,3 +97,8 @@ DAI_CONFIG(SSP, 2, 0, SSP2-Codec,
SSP_CLOCK(fsync, 48000, codec_slave),
SSP_TDM(2, 25, 3, 3),
SSP_CONFIG_DATA(SSP, 2, 24)))
+
+VIRTUAL_WIDGET(codec_out0, output, 1)
+VIRTUAL_WIDGET(codec_out1, output, 2)
+VIRTUAL_WIDGET(codec_in0, input, 3)
+VIRTUAL_WIDGET(codec_in1, input, 4)

Alternatively we should add those widgets to byt.m4 so that this isn't duplicated everywhere. @ranj063 want do you think of this?

Comment thread tools/topology/sof-bdw-rt5640.m4 Outdated

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.

this is not needed, bdw is not impacted - different driver.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've removed them.

@xun2z

xun2z commented Jan 10, 2019

Copy link
Copy Markdown
Collaborator Author

@plbossart

topology: sof-byt-rt5651.tplg

dmesg without virtual widgets:

[ 14.244621] rt5651 i2c-10EC5651:00: Warning: Invalid over-current-threshold-microamp value: 0, defaulting to 2000uA
[ 14.245586] bytcr_rt5651 bytcr_rt5651: ASoC: no source widget found for codec_out0
[ 14.245592] bytcr_rt5651 bytcr_rt5651: ASoC: Failed to add route codec_out0 -> direct -> ssp2 Tx
[ 14.245604] bytcr_rt5651 bytcr_rt5651: ASoC: no source widget found for codec_out1
[ 14.245609] bytcr_rt5651 bytcr_rt5651: ASoC: Failed to add route codec_out1 -> direct -> ssp2 Tx
[ 14.245620] bytcr_rt5651 bytcr_rt5651: ASoC: no sink widget found for codec_in0
[ 14.245625] bytcr_rt5651 bytcr_rt5651: ASoC: Failed to add route ssp2 Rx -> direct -> codec_in0
[ 14.245636] bytcr_rt5651 bytcr_rt5651: ASoC: no sink widget found for codec_in1
[ 14.245641] bytcr_rt5651 bytcr_rt5651: ASoC: Failed to add route ssp2 Rx -> direct -> codec_in1
[ 14.245669] bytcr_rt5651 bytcr_rt5651: ASoC: failed to init SSP2-Codec: -19
[ 14.245674] bytcr_rt5651 bytcr_rt5651: ASoC: failed to instantiate card -19
[ 14.245684] sof-audio sof-audio: free topology...
[ 14.245710] sof-audio sof-audio: error: failed to find dai Media Playback 1
[ 14.245717] sof-audio sof-audio: error: failed to find dai Low Latency
[ 14.245946] bytcr_rt5651 bytcr_rt5651: devm_snd_soc_register_card failed -19

dmesg with virtual widgets:

[ 14.542178] rt5651 i2c-10EC5651:00: Warning: Invalid over-current-threshold-microamp value: 0, defaulting to 2000uA
[ 14.544135] bytcr_rt5651 bytcr_rt5651: rt5651-aif1 <-> ssp2-port mapping ok
[ 14.544223] sof-audio sof-audio: creating new PCM Low Latency
[ 14.544228] sof-audio sof-audio: spcm: allocate Low Latency Playback 0 playback DMA buffer size 0x10000 max 0x10000
[ 14.544282] sof-audio sof-audio: spcm: allocate Low Latency Capture 0 capture DMA buffer size 0x10000 max 0x10000
[ 14.544316] bytcr_rt5651 bytcr_rt5651: snd-soc-dummy-dai <-> Low Latency 0 mapping ok
[ 14.544378] sof-audio sof-audio: creating new PCM Media Playback 1
[ 14.544383] sof-audio sof-audio: spcm: allocate Media Playback 1 playback DMA buffer size 0x800000 max 0x800000
[ 14.585251] bytcr_rt5651 bytcr_rt5651: snd-soc-dummy-dai <-> Media Playback 1 mapping ok

@xiulipan

Copy link
Copy Markdown
Contributor

@xun2z
I think we can only test with RT5651? Did not have any other codec here. So please careful re-read the machine driver to see if all the changes fit each machine driver.

@ranj063

ranj063 commented Jan 10, 2019

Copy link
Copy Markdown
Collaborator

You are missing widgets in for bytcr_rt5640

diff --git a/tools/topology/sof-byt-rt5640.m4 b/tools/topology/sof-byt-rt5640.m4
index 5e6cb049..cba24f29 100644
--- a/tools/topology/sof-byt-rt5640.m4
+++ b/tools/topology/sof-byt-rt5640.m4
@@ -97,3 +97,8 @@ DAI_CONFIG(SSP, 2, 0, SSP2-Codec,
SSP_CLOCK(fsync, 48000, codec_slave),
SSP_TDM(2, 25, 3, 3),
SSP_CONFIG_DATA(SSP, 2, 24)))
+
+VIRTUAL_WIDGET(codec_out0, output, 1)
+VIRTUAL_WIDGET(codec_out1, output, 2)
+VIRTUAL_WIDGET(codec_in0, input, 3)
+VIRTUAL_WIDGET(codec_in1, input, 4)

Alternatively we should add those widgets to byt.m4 so that this isn't duplicated everywhere. @ranj063 want do you think of this?
@plbossart wouldnt these also depend on the codec apart from the platform? I am not sure if the virtual_widgtes

You are missing widgets in for bytcr_rt5640

diff --git a/tools/topology/sof-byt-rt5640.m4 b/tools/topology/sof-byt-rt5640.m4
index 5e6cb049..cba24f29 100644
--- a/tools/topology/sof-byt-rt5640.m4
+++ b/tools/topology/sof-byt-rt5640.m4
@@ -97,3 +97,8 @@ DAI_CONFIG(SSP, 2, 0, SSP2-Codec,
SSP_CLOCK(fsync, 48000, codec_slave),
SSP_TDM(2, 25, 3, 3),
SSP_CONFIG_DATA(SSP, 2, 24)))
+
+VIRTUAL_WIDGET(codec_out0, output, 1)
+VIRTUAL_WIDGET(codec_out1, output, 2)
+VIRTUAL_WIDGET(codec_in0, input, 3)
+VIRTUAL_WIDGET(codec_in1, input, 4)

Alternatively we should add those widgets to byt.m4 so that this isn't duplicated everywhere. @ranj063 want do you think of this?

@plbossart sorry for the delay.
I just checked the byt machine drivers. if we add it to byt.m4 it would work for 3 of those but byt-rt5640.c doesnt seem to have these. Does the T100 use this machine driver?

@plbossart

Copy link
Copy Markdown
Member

@plbossart sorry for the delay.
I just checked the byt machine drivers. if we add it to byt.m4 it would work for 3 of those but byt-rt5640.c doesnt seem to have these. Does the T100 use this machine driver?

those virtual widgets are needed for rt5640, I tested it yesterday. Rather than add it 4 times it's simpler to add them all to byt.m4 (actually also cht.m4?)

@ranj063

ranj063 commented Jan 10, 2019

Copy link
Copy Markdown
Collaborator

@plbossart sorry for the delay.
I just checked the byt machine drivers. if we add it to byt.m4 it would work for 3 of those but byt-rt5640.c doesnt seem to have these. Does the T100 use this machine driver?

those virtual widgets are needed for rt5640, I tested it yesterday. Rather than add it 4 times it's simpler to add them all to byt.m4 (actually also cht.m4?)
@plbossart yes then of course it makes sense. @xun2z could you please update the PR accordingly?

add some widgets to prevent kernel warnings generated by the machine
driver.

Signed-off-by: Xun Zhang <xun2.zhang@intel.com>
@lgirdwood
lgirdwood merged commit 24422c6 into thesofproject:master Jan 14, 2019
@xiulipan

Copy link
Copy Markdown
Contributor

@xun2z Good job! First PR accepted.

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