mh ... okay perhaps you could first tell where i can find information about this function?!
i´m guessing this is needed and the correct implementation would prefend the error while booting :[ 8.545985] audioinjector-stereo sound-ext-card: ASoC: CODEC DAI wm8731-hifi not registered
This means that the kernel can't find the codec in the set of
known devices.
Have you checked for the wm8731 ko driver in the /lib/kernel/modules... directory ? Have you checked that your device tree is loading ? The device tree is meant to load the wm8731 codec driver.
If the device tree is loading, then you may need to tell the kernel that new devices are available. Normally :
depmod -a
The depmod command will rebuild the modules.dep and map files.
how can i help you helping me ;) what information about the device do you need?
Lets keep working through this together.
Matt
Mit freundlichen Grüßen - King regardsSteffen Heilmann
Am Di., 2. Juni 2020 um 02:03 Uhr schrieb Matt <matt@audioinjector.net>:
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 :
To an assumed working probe function :
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 :
with theirs :
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
Mit freundlichen Grüßen - King regardsSteffen Heilmann
Am Mo., 1. Juni 2020 um 23:17 Uhr schrieb Matt via People <people@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 Guysi 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
1- Start with "Get the kernel source" and clone/ download the source from github2- 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 Pi add on soundcard"
select SND_SOC_WM8731
help
Say Y or M if you want to add support for audioinjector.net Pi Hat
6- in the same directory inside the Makefile add to line 36snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o
and after the last line addobj-$(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 sourcethe 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 selectedDevice Drivers -> Sound card support -> Advanced Linux Sound Architecture -> ALSA for SoC audio support -> Support for 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
andDevice 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 deviceand 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 regardsSteffen 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@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
-- Our latest product launching now on Kickstarter : https://bit.ly/2Qr1557 Checkout the community email list : https://lists.audioinjector.net/mailman/listinfo/people