Repository navigation
Adding Support for interlude audio Hats. - #5949
Conversation
pelwell
left a comment
There was a problem hiding this comment.
It's good that you are adding your code to an existing driver, but it shouldn't impact other users of the driver. Go through the review comments and checkpatch complaints, squash the results down to two commits - a driver patch and one for the overlays - then force push it so we can review the result.
| snd_clk48gpio = | ||
| devm_gpiod_get(&pdev->dev, "clock48", GPIOD_OUT_LOW); | ||
|
|
||
| led_gpio_1 = devm_gpiod_get(&pdev->dev, "led1", GPIOD_OUT_LOW); |
There was a problem hiding this comment.
Board-specific code like this needs to go into the board-specific probe function, in this case snd_interlude_audio_digital_probe.
| dev_err(rtd->card->dev, | ||
| "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n", | ||
| samplerate); | ||
|
|
There was a problem hiding this comment.
Don't make random whitespace changes.
|
|
||
| /* clear until all clocks are setup properly */ | ||
| wm8804_samplerate = 0; | ||
|
|
There was a problem hiding this comment.
Don't make random whitespace changes.
| break; | ||
| case 44100: | ||
| sampling_freq = 0x00; | ||
| gpiod_set_value_cansleep(led_gpio_1, 1); |
There was a problem hiding this comment.
This code is shared with all the other wm8804-based cards. You should create your own hw_params function that calls this one and also sets the LEDs as you want them. You can hook that in by providing a .ops member to snd_interlude_audio_digital_dai.
2bc7f45 to
51d5f07
Compare
7681ef6 to
054b41e
Compare
|
Hello @pelwell all requested changes have been completed we have squashed the changes down to 2 commits and have tested the modified driver code and confirmed it works; look forward to your review |
pelwell
left a comment
There was a problem hiding this comment.
I think you're nearly there, but there are a few improvements still to be made. See the inline comments. Also, please fix the checkpatch errors and warnings: https://github.com/raspberrypi/linux/actions/runs/7908859459/job/21601350819?pr=5949#step:6:74
|
|
||
| static int snd_interlude_audio_digital_probe(struct platform_device *pdev) | ||
| { | ||
| pr_debug("%s\n", __func__); |
There was a problem hiding this comment.
You can drop this line now.
| { | ||
| snd_soc_add_component_controls(component, wm8805_input_controls_card, | ||
| ARRAY_SIZE(wm8805_input_controls_card)); | ||
| pr_debug("adding new controls"); |
| snd_clk48gpio = | ||
| devm_gpiod_get(&pdev->dev, "clock48", GPIOD_OUT_LOW); | ||
|
|
||
| custom_reset = devm_gpiod_get(&pdev->dev, "reset", GPIOD_OUT_LOW); |
There was a problem hiding this comment.
All of this can go in your custom probe function.
e60c176 to
31d0747
Compare
| snd_clk48gpio = | ||
| devm_gpiod_get(&pdev->dev, "clock48", GPIOD_OUT_LOW); | ||
|
|
||
| if(of_property_read_u32(pdev->dev.of_node, "sys_clk", &sysclk_freq)) |
There was a problem hiding this comment.
I meant all of it, including the sys_clk logic - you have no reason to make changes for the other drivers, particularly the kernel log spam.
There was a problem hiding this comment.
okay sounds good changes have been made
738a168 to
01bd752
Compare
Implementing driver support for Interlude audio's WM8805 based digital hat by leveraging existing drivers
Adding 2 new overlays for use with Interlude Audio's Digital and Analog hats adding descriptions for both in README adding changes to Makefile to include both DT's
01bd752 to
0fd3c32
Compare
|
All changes have been made the build tests and checkpatch review action should pass as well |
|
If you're happy with that then so am I. I'll merge once the build checks have completed. |
|
Thanks for your help |
kernel: vc4/hvs: Fix lbm size calculation for yuv See: raspberrypi/linux#5963 kernel: Set PCIe QOS chicken bits for 2712D0 See: raspberrypi/linux#5955 kernel: Add support for VEML6075 and HTS221 in i2c-sensor overlay See: raspberrypi/linux#5965 kernel: Adding Support for interlude audio Hats See: raspberrypi/linux#5949 kernel: brcmfmac: Add sae_ext WPA3 support See: raspberrypi/linux#5945 kernel: arm: dt: bcm2712: Reduce DDC frequency to 97.5kHz from 200kHz See: raspberrypi/linux#5954 kernel: ARM: dts: Add CM5 DTS support
kernel: vc4/hvs: Fix lbm size calculation for yuv See: raspberrypi/linux#5963 kernel: Set PCIe QOS chicken bits for 2712D0 See: raspberrypi/linux#5955 kernel: Add support for VEML6075 and HTS221 in i2c-sensor overlay See: raspberrypi/linux#5965 kernel: Adding Support for interlude audio Hats See: raspberrypi/linux#5949 kernel: brcmfmac: Add sae_ext WPA3 support See: raspberrypi/linux#5945 kernel: arm: dt: bcm2712: Reduce DDC frequency to 97.5kHz from 200kHz See: raspberrypi/linux#5954 kernel: ARM: dts: Add CM5 DTS support
Interlude Audio has created 2 hats for the raspberry to be put up for sale online at www.interludeaudio.com the hats are based of the cs4272 and wm8805 codec and spdif chip which which leverage pre-existing drivers, enhanced with support for the unique features of our devices. We hope to mainline our changes to the kernel so as to have them readily available for inclusion in future releases.