[AudioI] Audioinjector Stereo on Radxa Rockpi4(b) - RK3399 Device with Vendor and Mainline Kernel
Matt
matt at audioinjector.net
Tue Jun 2 00:03:38 UTC 2020
Great, I can see your commits here :
https://github.com/verplant23/kernel/commit/449f587e3b866a2e9a119bf0669848c28d7e6eaa
I think you will want to alter a few things. Lets start with the ALSA
machine driver.
First of all your probe looks very different to a probe from a different
machine driver in the same directory. Compare your probe function :
https://github.com/verplant23/kernel/commit/449f587e3b866a2e9a119bf0669848c28d7e6eaa#diff-b3c2442cf442954b73d64863b0a76f42R151
To an assumed working probe function :
https://github.com/verplant23/kernel/blob/release-4.4-rockpi4/sound/soc/rockchip/rockchip_rt5651_tc358749x.c#L187
You will want to copy their approach to setting the platform_of_node and
the cpu_of_node.
Next, in their snd_soc_dai_link structure, they don't have the
cpu_dai_name nor the platform_name. Compare yours :
https://github.com/verplant23/kernel/commit/449f587e3b866a2e9a119bf0669848c28d7e6eaa#diff-b3c2442cf442954b73d64863b0a76f42R103
with theirs :
https://github.com/verplant23/kernel/blob/release-4.4-rockpi4/sound/soc/rockchip/rockchip_rt5651_tc358749x.c#L148
Theirs is more complex because they have various links, we have only
one. However you can see in their "DAILINK_RT5651_HIFI" link, there is
no cpu_dai_name nor platform_name.
That is a start.
If you can alter that and link us with their device tree for comparison
with yours that would also be helpful.
Matt
On 2/6/20 9:08 am, Steffen Heilmann wrote:
> never used git ...but here you go
> https://github.com/verplant23/kernel
>
>
> Mit freundlichen Grüßen - King regards
> /Steffen Heilmann/
>
>
> Am Mo., 1. Juni 2020 um 23:17 Uhr schrieb Matt via People
> <people at lists.audioinjector.net <mailto:people at lists.audioinjector.net>>:
>
> 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
>
>
> --
> People mailing list
> People at lists.audioinjector.net <mailto:People at lists.audioinjector.net>
> https://lists.audioinjector.net/mailman/listinfo/people
>
--
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/a5c018fa/attachment.htm>
More information about the People
mailing list