From 5e9bd11c4722d96fd35f1a60f80209474e4ffe76 Mon Sep 17 00:00:00 2001 From: Huw Date: Tue, 31 Jan 2023 15:05:57 +0000 Subject: [PATCH] Add version of clock tool which allows arbitrary clock setting --- CHANGELOG.md | 4 +++ resources/clk_dac_setup/Makefile | 5 ++- resources/clk_dac_setup/setup_mclk_bclk.c | 37 +++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44477e7..83c53b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # VocalFusion Raspberry Pi Setup Change Log +## 5.5.0 + + * Add tool for setting arbitrary I2S clock + ## 5.4.0 * Add support for XVF3800 diff --git a/resources/clk_dac_setup/Makefile b/resources/clk_dac_setup/Makefile index 24c7ec0..5177585 100644 --- a/resources/clk_dac_setup/Makefile +++ b/resources/clk_dac_setup/Makefile @@ -1,4 +1,4 @@ -default: bclk mclk +default: bclk mclk setup_arbitrary_i2s_rate bclk: setup_mclk_bclk.c gcc -g -o setup_bclk setup_mclk_bclk.c @@ -6,6 +6,9 @@ bclk: setup_mclk_bclk.c mclk: setup_mclk_bclk.c gcc -g -DMCLK -o setup_mclk setup_mclk_bclk.c +setup_arbitrary_i2s_rate: setup_mclk_bclk.c + gcc -g -DARBITRARY_LRCLK -o setup_arbitrary_i2s_rate setup_mclk_bclk.c + clean: rm -f setup_mclk rm -f setup_bclk diff --git a/resources/clk_dac_setup/setup_mclk_bclk.c b/resources/clk_dac_setup/setup_mclk_bclk.c index 9297f7a..dbfffc4 100644 --- a/resources/clk_dac_setup/setup_mclk_bclk.c +++ b/resources/clk_dac_setup/setup_mclk_bclk.c @@ -99,6 +99,18 @@ void gpioSetMode(unsigned gpio, unsigned mode) gpioReg[reg] = (gpioReg[reg] & ~(7< 1){