Title: Problem with modifying topology files · Issue #408 · thesofproject/sof-docs · GitHub
Open Graph Title: Problem with modifying topology files · Issue #408 · thesofproject/sof-docs
X Title: Problem with modifying topology files · Issue #408 · thesofproject/sof-docs
Description: Hello, I have been following the Hello World Tutorial, and in the Part II - Modifying the Topology & Driver I got the following output: -- The C compiler identification is GNU 7.5.0 -- Detecting C compiler ABI info -- Detecting C compile...
Open Graph Description: Hello, I have been following the Hello World Tutorial, and in the Part II - Modifying the Topology & Driver I got the following output: -- The C compiler identification is GNU 7.5.0 -- Detecting C ...
X Description: Hello, I have been following the Hello World Tutorial, and in the Part II - Modifying the Topology & Driver I got the following output: -- The C compiler identification is GNU 7.5.0 -- Detectin...
Opengraph URL: https://github.com/thesofproject/sof-docs/issues/408
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Problem with modifying topology files","articleBody":"Hello, \r\nI have been following the Hello World Tutorial, and in the [Part II - Modifying the Topology \u0026 Driver](https://thesofproject.github.io/latest/developer_guides/firmware/component-tutorial/tut-ii-topology.html) I got the following output:\r\n\r\n\u003e -- The C compiler identification is GNU 7.5.0\r\n\u003e -- Detecting C compiler ABI info\r\n\u003e -- Detecting C compiler ABI info - done\r\n\u003e -- Check for working C compiler: /usr/bin/cc - skipped\r\n\u003e -- Detecting C compile features\r\n\u003e -- Detecting C compile features - done\r\n\u003e -- No CMAKE_BUILD_TYPE, defaulting to Debug\r\n\u003e -- Configuring done\r\n\u003e -- Generating done\r\n\u003e -- Build files have been written to: /home/kubuntu/Documents/work/sof/sof/tools/build_tools\r\n\u003e -- The C compiler identification is GNU 7.5.0\r\n\u003e -- Detecting C compiler ABI info\r\n\u003e -- Detecting C compiler ABI info - done\r\n\u003e -- Check for working C compiler: /usr/bin/cc - skipped\r\n\u003e -- Detecting C compile features\r\n\u003e -- Detecting C compile features - done\r\n\u003e -- Found PkgConfig: /usr/bin/pkg-config (found version \"0.29.1\") \r\n\u003e -- Checking for one of the modules 'glib-2.0'\r\n\u003e -- Configuring done\r\n\u003e -- Generating done\r\n\u003e -- Build files have been written to: /home/kubuntu/Documents/work/sof/sof/tools/build_tools/fuzzer\r\n\u003e + cmake --build /home/kubuntu/Documents/work/sof/sof/tools/build_tools --\r\n\u003e [ 0%] Built target abi_v1\r\n\u003e [ 0%] Generating production/main-topology.conf\r\n\u003e [ 0%] Generating production/main-topology.tplg\r\n\u003e ALSA lib conf.c:2005:(_snd_config_load_with_include) _toplevel_:21:49:Unexpected char\r\n\u003e ALSA lib parser.c:223:(tplg_load_config) could not load configuration\r\n\u003e Unable to load configuration: Invalid argument\r\n\u003e topology/topology1/CMakeFiles/topology1_main-topology.dir/build.make:72: recipe for target 'topology/topology1/production/main-topology.tplg' failed\r\n\u003e make[2]: *** [topology/topology1/production/main-topology.tplg] Error 1\r\n\u003e CMakeFiles/Makefile2:5081: recipe for target 'topology/topology1/CMakeFiles/topology1_main-topology.dir/all' failed\r\n\u003e make[1]: *** [topology/topology1/CMakeFiles/topology1_main-topology.dir/all] Error 2\r\n\u003e Makefile:135: recipe for target 'all' failed\r\n\u003e make: *** [all] Error 2\r\n\r\nI don catch where is the error, then i tried to modify [sof-imx8mp-wm8904.m4](https://github.com/thesofproject/sof/pull/5302/files) , it can be compiled, I where the pipe-volume-playback-4test.m4 file is modified with small changes in order to find out where is the error.\r\n\r\nThe code for pipe-volume-playback-4test.m4 is:\r\n```\r\n# Low Latency Passthrough with volume Pipeline and PCM\r\n#\r\n# Pipeline Endpoints for connection are :-\r\n#\r\n# host PCM_P --\u003e B0 --\u003e Volume 0 --\u003e B1 --\u003e sink DAI0\r\n\r\n# Include topology builder\r\ninclude(`utils.m4')\r\ninclude(`buffer.m4')\r\ninclude(`pcm.m4')\r\ninclude(`pga.m4')\r\ninclude(`dai.m4')\r\ninclude(`mixercontrol.m4')\r\ninclude(`bytecontrol.m4') # ADDED\r\ninclude(`pipeline.m4')\r\ninclude(`amp.m4') # ADDED\r\n\r\n#\r\n# Controls\r\n#\r\n# Volume Mixer control with max value of 32\r\nC_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,\r\n\tCONTROLMIXER_OPS(volsw, 256 binds the mixer control to volume get/put handlers, 256, 256),\r\n\tCONTROLMIXER_MAX(, 32),\r\n\tfalse,\r\n\tCONTROLMIXER_TLV(TLV 32 steps from -64dB to 0dB for 2dB, vtlv_m64s2),\r\n\tChannel register and shift for Front Left/Right,\r\n\tVOLUME_CHANNEL_MAP)\r\n\r\n#\r\n# Volume configuration\r\n#\r\n\r\ndefine(DEF_PGA_TOKENS, concat(`pga_tokens_', PIPELINE_ID))\r\ndefine(DEF_PGA_CONF, concat(`pga_conf_', PIPELINE_ID))\r\n\r\nW_VENDORTUPLES(DEF_PGA_TOKENS, sof_volume_tokens,\r\nLIST(`\t\t', `SOF_TKN_VOLUME_RAMP_STEP_TYPE\t\"2\"'\r\n `\t\t', `SOF_TKN_VOLUME_RAMP_STEP_MS\t\t\"20\"'))\r\n\r\nW_DATA(DEF_PGA_CONF, DEF_PGA_TOKENS)\r\n\r\n\r\n############### ADDED ###############\r\n# Amp Parameters\r\ninclude(`amp_bytes.m4')\r\n\r\n# Amp Bytes control with max value of 140\r\n# The max size needs to also take into account the space required to hold the control data IPC message\r\n# struct sof_ipc_ctrl_data requires 92 bytes\r\n# AMP priv in amp_bytes.m4 (ABI header (32 bytes) + 2 dwords) requires 40 bytes\r\n# Therefore at least 132 bytes are required for this kcontrol\r\n# Any value lower than that would end up in a topology load error\r\nC_CONTROLBYTES(AMP, PIPELINE_ID,\r\n CONTROLBYTES_OPS(bytes, 258 binds the control to bytes get/put handlers, 258, 258),\r\n CONTROLBYTES_EXTOPS(258 binds the control to bytes get/put handlers, 258, 258),\r\n , , ,\r\n CONTROLBYTES_MAX(, 140),\r\n ,\r\n AMP_priv)\r\n#####################################\r\n\r\n#\r\n# Components and Buffers\r\n#\r\n\r\n# Host \"Passthrough Playback\" PCM\r\n# with 2 sink and 0 source periods\r\nW_PCM_PLAYBACK(PCM_ID, Passthrough Playback, 2, 0, SCHEDULE_CORE)\r\n\r\n# \"Volume\" has 2 source and x sink periods\r\nW_PGA(0, PIPELINE_FORMAT, DAI_PERIODS, 2, DEF_PGA_CONF, SCHEDULE_CORE,\r\n\tLIST(`\t\t', \"PIPELINE_ID Master Playback Volume\"))\r\n\r\n# Playback Buffers\r\nW_BUFFER(0, COMP_BUFFER_SIZE(2,\r\n\tCOMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),\r\n\tPLATFORM_HOST_MEM_CAP, SCHEDULE_CORE)\r\nW_BUFFER(1, COMP_BUFFER_SIZE(DAI_PERIODS,\r\n\tCOMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),\r\n\tPLATFORM_DAI_MEM_CAP, SCHEDULE_CORE)\r\n\r\n#\r\n# Pipeline Graph\r\n#\r\n# host PCM_P --\u003e B0 --\u003e Volume 0 --\u003e B1 --\u003e sink DAI0\r\n\r\nP_GRAPH(pipe-volume-playback, PIPELINE_ID,\r\n\tLIST(`\t\t',\r\n\t`dapm(N_BUFFER(0), N_PCMP(PCM_ID))',\r\n\t`dapm(N_PGA(0), N_BUFFER(0))',\r\n\t`dapm(N_BUFFER(1), N_PGA(0))'))\r\n\r\n#\r\n# Pipeline Source and Sinks\r\n#\r\nindir(`define', concat(`PIPELINE_SOURCE_', PIPELINE_ID), N_BUFFER(1))\r\nindir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_ID)\r\n\r\nifdef(`CHANNELS_MIN',`define(`LOCAL_CHANNELS_MIN', `CHANNELS_MIN')',\r\n`define(`LOCAL_CHANNELS_MIN', `2')')\r\n\r\n#\r\n# PCM Configuration\r\n\r\n#\r\nPCM_CAPABILITIES(Passthrough Playback PCM_ID, CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT), PCM_MIN_RATE, PCM_MAX_RATE, LOCAL_CHANNELS_MIN, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536)\r\n\r\nundefine(`LOCAL_CHANNELS_MIN')\r\nundefine(`DEF_PGA_TOKENS')\r\nundefine(`DEF_PGA_CONF')\r\n```\r\nAfter compilation, i got :\r\n\r\n+ cmake --build /home/kubuntu/Documents/work/sof/sof/tools/build_tools --\r\n[ 0%] Built target abi_v1\r\n[ 1%] Generating production/sof-imx8mp-wm8904.conf\r\n[ 1%] Generating production/sof-imx8mp-wm8904.tplg\r\nALSA lib data.c:1375:(tplg_parse_data) failed to parse data bytes\r\nALSA lib parser.c:231:(tplg_load_config) failed to parse topology\r\nUnable to load configuration: Invalid argument\r\ntopology/topology1/CMakeFiles/topology1_sof-imx8mp-wm8904.dir/build.make:72: recipe for target 'topology/topology1/production/sof-imx8mp-wm8904.tplg' failed\r\nmake[2]: *** [topology/topology1/production/sof-imx8mp-wm8904.tplg] Error 1\r\nCMakeFiles/Makefile2:5081: recipe for target 'topology/topology1/CMakeFiles/topology1_sof-imx8mp-wm8904.dir/all' failed\r\nmake[1]: *** [topology/topology1/CMakeFiles/topology1_sof-imx8mp-wm8904.dir/all] Error 2\r\nMakefile:135: recipe for target 'all' failed\r\nmake: *** [all] Error 2\r\n\r\nI hope someone could help me.\r\n\r\nThanks in advanced\r\nJulio C. Molina\r\n","author":{"url":"https://github.com/JCesarMolina","@type":"Person","name":"JCesarMolina"},"datePublished":"2022-03-21T10:35:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/408/sof-docs/issues/408"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c37d624a-e9e0-93ad-c1b7-b9c1efcf2db0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B130:3E5072:946C53:C26C6B:69818113 |
| html-safe-nonce | 43ba160b50f20b263d3f23958ee6cf5a8b1ca97932c137539da1548526e7b6ce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTMwOjNFNTA3Mjo5NDZDNTM6QzI2QzZCOjY5ODE4MTEzIiwidmlzaXRvcl9pZCI6IjExMzA2MjA4OTM3MTQ4MDkxMDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 151e1bf80b1aa74f79325e3c034ab355be3f4bb916673ee0b9f81699f5a5956d |
| hovercard-subject-tag | issue:1175185446 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/thesofproject/sof-docs/408/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9fdc8cb65b19d3d9f39388a5fc9c62f97b79041b7db2e6881c7e1e8c955320d6/thesofproject/sof-docs/issues/408 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9fdc8cb65b19d3d9f39388a5fc9c62f97b79041b7db2e6881c7e1e8c955320d6/thesofproject/sof-docs/issues/408 |
| og:image:alt | Hello, I have been following the Hello World Tutorial, and in the Part II - Modifying the Topology & Driver I got the following output: -- The C compiler identification is GNU 7.5.0 -- Detecting C ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JCesarMolina |
| hostname | github.com |
| expected-hostname | github.com |
| None | e137814e266030874fd2c86863529d0622b13889eeda04148c57654b6ea84ad6 |
| turbo-cache-control | no-preview |
| go-import | github.com/thesofproject/sof-docs git https://github.com/thesofproject/sof-docs.git |
| octolytics-dimension-user_id | 39773507 |
| octolytics-dimension-user_login | thesofproject |
| octolytics-dimension-repository_id | 135632972 |
| octolytics-dimension-repository_nwo | thesofproject/sof-docs |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135632972 |
| octolytics-dimension-repository_network_root_nwo | thesofproject/sof-docs |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | dd58d68a7813bbec9c91422c8c35f4af33832d70 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width