From 062126905168ec20bbadd8fb4d4add606de7ce11 Mon Sep 17 00:00:00 2001 From: Mihai Lindner Date: Mon, 27 Jan 2020 19:37:22 +0200 Subject: [PATCH 1/4] travis.yml: Override to build imx platforms only Build, package and deploy draft / pre-release binaries for imx only. DO NOT upstream this to thesofproject/sof. Upstream-Status: Inappropriate [imx specific] Signed-off-by: Mihai Lindner --- .travis.yml | 79 ++++++++++++++++++----------------------------------- 1 file changed, 27 insertions(+), 52 deletions(-) diff --git a/.travis.yml b/.travis.yml index d0d235f6c7ce..a326dfd75828 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +os: linux + sudo: required language: c @@ -5,62 +7,35 @@ language: c git: depth: false +branches: master + services: - docker -stages: - - test - - qemutest before_install: - docker pull thesofproject/sof && docker tag thesofproject/sof sof -env: - - PLATFORM=byt - - PLATFORM=cht - - PLATFORM=bdw - - PLATFORM=hsw - - PLATFORM=apl - - PLATFORM=skl - - PLATFORM=kbl - - PLATFORM=cnl - - PLATFORM=sue - - PLATFORM=icl - - PLATFORM=jsl - - PLATFORM=imx8 - - PLATFORM=imx8x - -script: ./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -j $PLATFORM +script: + - SOF_DESC=$(git describe --tag) + - SOF_TAG=${SOF_DESC%-*} + - SOF_VER=${SOF_TAG#v} + - SOF_REL=sof-imx-${SOF_VER} + - export TRAVIS_TAG=${SOF_TAG} + - install -d ./${SOF_REL}/{sof,sof-tplg} + - ./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -j imx8 + - ./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -j imx8x + - ./scripts/docker-run.sh ./scripts/build-tools.sh + - cp -v ./LICENCE ./${SOF_REL}/sof/ + - cp -v ./build_imx*_gcc/sof-imx* ./${SOF_REL}/sof/ + - cp -v ./tools/build_tools/topology/sof-imx* ./${SOF_REL}/sof-tplg/ + - tar czvf ${SOF_REL}.tar.gz ${SOF_REL} -jobs: - include: - - stage: test - script: ./scripts/docker-run.sh ./scripts/build-tools.sh - env: PLATFORM=tools - # Matrix hack: Declare the same stage name multiple times to test multiple - # versions. Use a YAML alias to prevent redundancy. - - &qemuboottest - stage: qemutest - script: - - sed -i $(($(grep "config HAVE_AGENT" -n src/platform/Kconfig | cut -f1 -d:)+2))"s/default y/default n/" src/platform/Kconfig - - ./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -r -j $PLATFORM - - ./scripts/docker-qemu.sh ../sof.git/scripts/qemu-check.sh $PLATFORM - env: PLATFORM=byt - before_install: - - docker pull thesofproject/sof && docker tag thesofproject/sof sof - - docker pull thesofproject/sofqemu && docker tag thesofproject/sofqemu sofqemu - - <<: *qemuboottest - env: PLATFORM=cht - - <<: *qemuboottest - env: PLATFORM=bdw - - <<: *qemuboottest - env: PLATFORM=hsw - - <<: *qemuboottest - env: PLATFORM=apl - - <<: *qemuboottest - env: PLATFORM=skl - - <<: *qemuboottest - env: PLATFORM=kbl - - <<: *qemuboottest - env: PLATFORM=cnl - - <<: *qemuboottest - env: PLATFORM=icl +deploy: + provider: releases + token: ${GITHUB_TOKEN} + skip_cleanup: true + prerelease: true + on: + tags: true + file: ${SOF_REL}.tar.gz + name: ${SOF_REL} From e57b68a6aa8d839590be08ac1c77c86b84eecdc8 Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Mon, 27 Jan 2020 14:26:55 +0200 Subject: [PATCH 2/4] topology: imx8: Change DAI name For now we are using generic simple-card as a machine driver, and the DAI name must followa certain pattern -. Temporarily change the DAI name in topology to match the name expected by the machine driver. There are still more changes to be done on the Linux kernel until the name gets stable, so do this temporary change now. Will push the code upstream once the Linux kernel changes are stable. Signed-off-by: Daniel Baluta --- tools/topology/sof-imx8qxp-cs42888.m4 | 6 +++--- tools/topology/sof-imx8qxp-wm8960.m4 | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/topology/sof-imx8qxp-cs42888.m4 b/tools/topology/sof-imx8qxp-cs42888.m4 index 85fe43fadc40..d6c7071fe67d 100644 --- a/tools/topology/sof-imx8qxp-cs42888.m4 +++ b/tools/topology/sof-imx8qxp-cs42888.m4 @@ -57,14 +57,14 @@ dnl period, priority, core, time_domain) # playback DAI is ESAI0 using 2 periods # Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, - 1, ESAI, 0, ESAI0-Codec, + 1, ESAI, 0, esai0-cs42888, PIPELINE_SOURCE_1, 2, s24le, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) # capture DAI is ESAI0 using 2 periods # Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, - 2, ESAI, 0, ESAI0-Codec, + 2, ESAI, 0, esai0-cs42888, PIPELINE_SINK_2, 2, s24le, 1000, 0, 0) @@ -74,7 +74,7 @@ dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) dnl DAI_CONFIG(type, idx, link_id, name, esai_config) -DAI_CONFIG(ESAI, 0, 0, ESAI0-Codec, +DAI_CONFIG(ESAI, 0, 0, esai0-cs42888, ESAI_CONFIG(I2S, ESAI_CLOCK(mclk, 49152000, codec_mclk_in), ESAI_CLOCK(bclk, 3072000, codec_slave), ESAI_CLOCK(fsync, 48000, codec_slave), diff --git a/tools/topology/sof-imx8qxp-wm8960.m4 b/tools/topology/sof-imx8qxp-wm8960.m4 index cc8245bb4c50..432acafa659e 100644 --- a/tools/topology/sof-imx8qxp-wm8960.m4 +++ b/tools/topology/sof-imx8qxp-wm8960.m4 @@ -56,14 +56,14 @@ dnl period, priority, core, time_domain) # playback DAI is SAI1 using 2 periods # Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, - 1, SAI, 1, be.wm8960-hifi, + 1, SAI, 1, sai1-wm8960-hifi, PIPELINE_SOURCE_1, 2, s24le, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) # capture DAI is SAI1 using 2 periods # Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, - 2, SAI, 1, be.wm8960-hifi, + 2, SAI, 1, sai1-wm8960-hifi, PIPELINE_SINK_2, 2, s24le, 1000, 0, 0) @@ -74,7 +74,7 @@ dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) dnl DAI_CONFIG(type, idx, link_id, name, sai_config) -DAI_CONFIG(SAI, 1, 0, be.wm8960-hifi, +DAI_CONFIG(SAI, 1, 0, sai1-wm8960-hifi, SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), SAI_CLOCK(bclk, 3072000, codec_master), SAI_CLOCK(fsync, 48000, codec_master), From 6732205bfbb96fecf309fa8d9490157eb00b61d3 Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Thu, 30 Jan 2020 15:27:28 +0200 Subject: [PATCH 3/4] topology: imx8: Use s32le format for wm8960 codec wm8960 codec drivers the master clock and for s24le we cannot easily derive the bitclk. So, switch to s32le. SAI supports s32le format. The initial s23le was added because topology was based on sof-imx8qxp-cs42888.m4 which uses ESAI and that's limited to s24le. Signed-off-by: Daniel Baluta --- tools/topology/sof-imx8qxp-wm8960.m4 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/topology/sof-imx8qxp-wm8960.m4 b/tools/topology/sof-imx8qxp-wm8960.m4 index 432acafa659e..66c964132f61 100644 --- a/tools/topology/sof-imx8qxp-wm8960.m4 +++ b/tools/topology/sof-imx8qxp-wm8960.m4 @@ -31,17 +31,17 @@ dnl period, priority, core, dnl pcm_min_rate, pcm_max_rate, pipeline_rate, dnl time_domain, sched_comp) -# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. +# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. # Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, - 1, 0, 2, s24le, + 1, 0, 2, s32le, 1000, 0, 0, 48000, 48000, 48000) -# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. +# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le. # Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, - 2, 0, 2, s24le, + 2, 0, 2, s32le, 1000, 0, 0, 48000, 48000, 48000) # @@ -54,17 +54,17 @@ dnl buffer, periods, format, dnl period, priority, core, time_domain) # playback DAI is SAI1 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SAI, 1, sai1-wm8960-hifi, - PIPELINE_SOURCE_1, 2, s24le, + PIPELINE_SOURCE_1, 2, s32le, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) # capture DAI is SAI1 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SAI, 1, sai1-wm8960-hifi, - PIPELINE_SINK_2, 2, s24le, + PIPELINE_SINK_2, 2, s32le, 1000, 0, 0) From 4efc5091e7d5e309a79ce8108c4bcba6cd3f1a56 Mon Sep 17 00:00:00 2001 From: Mihai Lindner Date: Thu, 5 Mar 2020 16:56:22 +0200 Subject: [PATCH 4/4] travis.yml: Fix tagging Signed-off-by: Mihai Lindner --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a326dfd75828..b0dc697f48e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ before_install: script: - SOF_DESC=$(git describe --tag) - - SOF_TAG=${SOF_DESC%-*} + - SOF_TAG=${SOF_DESC%-g*} - SOF_VER=${SOF_TAG#v} - SOF_REL=sof-imx-${SOF_VER} - export TRAVIS_TAG=${SOF_TAG}