[AudioI] Audioinjector Stereo on Radxa Rockpi4(b) - RK3399 Device with Vendor and Mainline Kernel

Matt matt at audioinjector.net
Mon Jun 1 21:17:25 UTC 2020


Hey this sounds great!

To make this easier, you will probably want to fork the 
https://github.com/radxa/kernel.git repo to your own github account. You 
can then clone that repo. You can then also push your changes back to 
your fork of that repo.

After that, the easiest way to understand what you have done is to link 
us to the changes on github. Once you get to this stage, we can also 
pull your version of the kernel and build it.

I am happy to build what you produce and test is compiles, however I 
can't test it on the hardware because I don't have any.

Matt

On 2/6/20 6:45 am, Steffen Heilmann via People wrote:
> Hello Guys
> i managed to get the wm8731 ai stereo to work with the radxa rk3399 
> rockpi 4(b).
> the steps are basicly the same for the Mainline Kernel and the vendor 
> version which is 4.4.154.
>
> i´m not a coder or kernel guy. and i don´t say this is the perfect way 
> i did it. i do not even know everything i changed is necessary.
>
> so perhaps there are some guys out there who will also post their 
> ideas or help make everything  " how a code should be implemented."
>
> The hardware pinout on the rockpi4 is announced to be the same pinout 
> as the rpi this is why i choose the device. you can hook up the device 
> without burning something.
>
> the steps are the nearly the same for both kernel versions. but for 
> mainline you have to choose the mainline audioinjector code from rpi 
> source. i also used the armbian dev build environment making 
> everythin easier.
>
> This is the vendor wiki and the steps describe how to build the vendor 
> kernel
> https://wiki.radxa.com/Rockpi4/dev/kernel-4.4
>
> 1- Start with  "Get the kernel source" and clone/ download the source 
> from github
> 2- cd to the directory " 
> /arch/arm64/boot/dts/rockchip/overlays-rockpi4/ " and add
>    " audioinjector-wm8731-audio.dtbo \ " as line 16 the the Makefile.
>      it  should look like:
> /    .../
> /hifiberry-dacplus.dtbo \
> audioinjector-wm8731-audio.dtbo \
> raspberrypi-7-inch-lcd.dtbo \
> /
> /.../
>
> 3- in the same directory add the file 
> "audioinjector-wm8731-audio-overlay.dts"
>   (the attachment i made )
> 4- in the same directory add the following to the hw_intfc.conf :
> /#audioinjector-wm8731-audio on I2C7. Need set: intfc:i2c7=on
> #intfc:dtoverlay=audioinjector-wm8731-audio/
>
> 5- cd to the directory /sound/soc/rockchip/ an add the following to 
> the Kconfig file :
> /config SND_AUDIOINJECTOR_PI_SOUNDCARD
>        tristate "Support for audioinjector.net 
> <http://audioinjector.net> Pi add on soundcard"
>        select SND_SOC_WM8731
>        help
>            Say Y or M if you want to add support for audioinjector.net 
> <http://audioinjector.net> Pi Hat/
>
> 6-  in the same directory inside the Makefile add to line 36
> /snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o/
> and after the last line add
> /obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += 
> snd-soc-audioinjector-pi-soundcard.o/
>
> 7- to the same directory add this file /audioinjector-pi-soundcard.c / 
> from attachment (original from raspi source
> https://github.com/raspberrypi/linux/blob/rpi-4.19.y/sound/soc/bcm/audioinjector-pi-soundcard.c 
> )
> the changes to audioinjector-pi-soundcard.c file belongs to the i2c 
> code and to the bclk_ratio inside hw_params
> look inside the file i attached and compare with source
>
> 8- follow up the vendors guide to build the kernel and to additional 
> steps with "make menuconfig"
>
> and check settings selected
> /Device Drivers -> Sound card support -> Advanced Linux Sound 
> Architecture -> ALSA for SoC audio support -> *Support for 
> audioinjector.net <http://audioinjector.net> Pi add on soundcard*/
>
> also unselect following because for me did some error while compiling :
> /Device Drivers -> Sound card support -> Advanced Linux Sound 
> Architecture -> ALSA for SoC audio support ->  CODEC driver -> 
> *Rockchip RK3308 CODEC*/
> and
> /Device Drivers -> Sound card support -> Advanced Linux Sound 
> Architecture -> ALSA for SoC audio support ->  CODEC driver -> *RK3328 
> CODEC*/
>
>  9- for example follow the guide building the *.deb packages and 
> install them.
>
> 10-  booting up should now show the audioinjector stereo device. don´t 
> care about the errors  as long as u get from dmesg : 
> /audioinjector-stereo sound-ext-card: wm8731-hifi <-> ff890000.i2s 
> mapping ok/
>
> 11- follow 
> https://www.alsa-project.org/wiki/Setting_the_default_device to select 
> your default device
> and reboot again
>
> don´t forget to unmute the device inside alsamixer
>
> Sorry for my bad english and have fun with your audioinjector stereo 
> on rk3399
>
> Mit freundlichen Grüßen - King regards
> /Steffen Heilmann/
>
-- 
Our latest product launching now on Kickstarter :
https://bit.ly/2Qr1557
Checkout the community email list :
https://lists.audioinjector.net/mailman/listinfo/people

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.audioinjector.net/pipermail/people/attachments/20200602/897011ca/attachment-0001.htm>


More information about the People mailing list