The mentioned I2S pins in the GPIO do not provide any signal in the logic analyser although uncommenting in /boot/config.txt and rebooting.
The main purpose is integrating the audio codec (MAX98090) via the I2S interface.
The codec is perfectly detected over the RPi4's I2C interface. However, the RPi's I2S interface does not seem to be enabled.
shows it loads max98090.dtbo from /mfs/sd/overlays/ but could not find max98090.dtbo anywhere in the total RPi 4 SD card. Didn't get where does it get loaded from.No trace of MAX98090 seems connected here.So I reconfigured a kernel from which I got a module for generated.Thus I created the overlay for max98090.dts form a .yaml file with the help of ChatGPT.The .yaml file from /linux/Documentation/devicetree/bindings/sound/maxim,max98090.yaml of (https://github.com/raspberrypi/linux)I am struggling to find a way to get the I2S pins on RPi4 to work.
Kindly help me find a solution to this.
Thanks.
Code:
dtparam=i2s=onThe main purpose is integrating the audio codec (MAX98090) via the I2S interface.
The codec is perfectly detected over the RPi4's I2C interface. However, the RPi's I2S interface does not seem to be enabled.
Code:
pi@raspberrypi:~ $ aplay -l**** List of PLAYBACK Hardware Devices ****card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7card 1: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0card 2: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0pi@raspberrypi:~ $ arecord -l**** List of CAPTURE Hardware Devices ****pi@raspberrypi:~ $ Code:
vclogCode:
pi@raspberrypi:~ $ sudo vclog -m003977.242: arasan: arasan_emmc_open003977.410: arasan: arasan_emmc_set_clock C0: 0x00800000 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 400000 max: 400000 delay: 5004082.186: arasan: arasan_emmc_set_clock C0: 0x00800000 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 400000 max: 400000 delay: 5004082.272: arasan: arasan_emmc_set_clock C0: 0x00800f00 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 390000 max: 400000 delay: 5004114.393: arasan: arasan_emmc_set_clock C0: 0x00800f06 C1: 0x000e0207 emmc: 200000000 actual: 50000000 div: 0x00000002 target: 50000000 min: 0 max: 50000000 delay: 1004122.792: brfs: File read: /mfs/sd/config.txt004123.598: brfs: File read: 1380 bytes004205.777: HDMI1:EDID error reading EDID block 0 attempt 0004206.793: HDMI1:EDID giving up on reading EDID block 0004215.725: brfs: File read: /mfs/sd/config.txt004984.035: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined004984.792: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined004986.942: *** Restart logging004986.964: brfs: File read: 1380 bytes005057.078: hdmi: HDMI1:EDID error reading EDID block 0 attempt 0005058.097: hdmi: HDMI1:EDID giving up on reading EDID block 0005063.137: hdmi: HDMI1:EDID error reading EDID block 0 attempt 0005064.153: hdmi: HDMI1:EDID giving up on reading EDID block 0005064.172: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead005064.188: HDMI0: hdmi_pixel_encoding: 300000000005064.199: HDMI1: hdmi_pixel_encoding: 300000000008168.070: brfs: File read: /mfs/sd/initramfs7l008168.102: Loaded 'initramfs7l' to 0x0 size 0xff8f35008185.580: initramfs loaded to 0x2e007000 (size 0xff8f35)008195.387: dtb_file 'bcm2711-rpi-4-b.dtb'008195.423: brfs: File read: 16748341 bytes008210.801: brfs: File read: /mfs/sd/bcm2711-rpi-4-b.dtb008210.834: Loaded 'bcm2711-rpi-4-b.dtb' to 0x100 size 0xdb5c008245.071: brfs: File read: 56156 bytes008265.182: brfs: File read: /mfs/sd/overlays/overlay_map.dtb008324.172: brfs: File read: 5423 bytes008330.071: brfs: File read: /mfs/sd/config.txt008330.233: dtparam: i2c_arm=on008352.250: dtparam: i2s=on008372.672: dtparam: spi=on008393.252: dtparam: audio=on008406.177: brfs: File read: 1380 bytes008436.850: brfs: File read: /mfs/sd/overlays/vc4-kms-v3d-pi4.dtbo008593.700: Loaded overlay 'vc4-kms-v3d-pi4'008974.825: brfs: File read: 3913 bytes009005.292: brfs: File read: /mfs/sd/overlays/max98090.dtbo009050.533: brfs: File read: /mfs/sd/cmdline.txt009050.629: Read command line from file 'cmdline.txt':009050.661: 'console=serial0,115200 console=tty1 root=PARTUUID=ba6c761b-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=GB'009399.253: brfs: File read: 176 bytes010933.205: brfs: File read: /mfs/sd/kernel7l.img010933.245: Loaded 'kernel7l.img' to 0x8000 size 0x778808010933.305: Device tree loaded to 0x2dff8e00 (size 0xe12e)010941.963: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined011050.984: sdram: sdram refresh 1562->6248 (1)014886.853: vchiq_core: vchiq_init_state: slot_zero = 0xcdd80000, is_master = 1014900.733: TV service:host side not connected, dropping notification 0x00000002, 0x00000001, 0x00000010288987.966: sdram: sdram refresh 1562->3124 (2)Code:
pi@raspberrypi:~ $ ls /dev/snd/by-path controlC0 controlC1 controlC2 pcmC0D0p pcmC1D0p pcmC2D0p seq timerCode:
snd-soc-max98090Code:
pi@raspberrypi:~ $ lsmod | grep -i i2ssnd_soc_bcm2835_i2s 12288 0snd_soc_core 266240 4 vc4,snd_soc_hdmi_codec,snd_soc_bcm2835_i2s,snd_soc_max98090snd_pcm 126976 7 snd_compress,snd_pcm_dmaengine,snd_soc_hdmi_codec,snd_soc_bcm2835_i2s,snd_soc_max98090,snd_bcm2835,snd_soc_coreCode:
pi@raspberrypi:~ $ lsmod | grep -i max98090snd_soc_max98090 65536 0regmap_i2c 12288 1 snd_soc_max98090snd_soc_core 266240 4 vc4,snd_soc_hdmi_codec,snd_soc_bcm2835_i2s,snd_soc_max98090snd_pcm 126976 7 snd_compress,snd_pcm_dmaengine,snd_soc_hdmi_codec,snd_soc_bcm2835_i2s,snd_soc_max98090,snd_bcm2835,snd_soc_coreCode:
/dts-v1/;/plugin/;/ { compatible = "brcm,bcm2711";//changed bcm2835 fragment@0 { target = <&i2c_arm>; __overlay__ { #address-cells = <1>; #size-cells = <0>; max98090: audio-codec@10 { compatible = "maxim,max98090"; reg = <0x10>; interrupt-parent = <&gpx3>;// gpio interrupts = <2 IRQ_TYPE_EDGE_FALLING>; // Adjust GPIO as needed clocks = <&i2s0 0>; clock-names = "mclk"; #sound-dai-cells = <0>; maxim,dmic-freq = <2500000>; // Default digital mic frequency maxim,micbias = <3>; // Micbias voltage set to 2.8V }; }; }; fragment@1 { target = <&i2s>; __overlay__ { status = "okay"; }; }; fragment@2 { target = <&sound>; __overlay__ { status = "okay"; compatible = "simple-audio-card"; simple-audio-card,format = "i2s"; simple-audio-card,bitclock-master = <&dailink_master>; simple-audio-card,frame-master = <&dailink_master>; simple-audio-card,cpu { sound-dai = <&i2s>; }; dailink_master: simple-audio-card,codec { sound-dai = <&max98090>; }; }; };};Code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause%YAML 1.2---$id: http://devicetree.org/schemas/sound/maxim,max98090.yaml#$schema: http://devicetree.org/meta-schemas/core.yaml#title: Maxim Integrated MAX98090/MAX98091 audio codecsmaintainers: - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>description: | Pins on the device (for linking into audio routes): MIC1, MIC2, DMICL, DMICR, IN1, IN2, IN3, IN4, IN5, IN6, IN12, IN34, IN56, HPL, HPR, SPKL, SPKR, RCVL, RCVR, MICBIASallOf: - $ref: dai-common.yaml#properties: compatible: enum: - maxim,max98090 - maxim,max98091 reg: maxItems: 1 clocks: items: - description: master clock clock-names: items: - const: mclk interrupts: maxItems: 1 maxim,dmic-freq: $ref: /schemas/types.yaml#/definitions/uint32 default: 2500000 description: DMIC clock frequency maxim,micbias: $ref: /schemas/types.yaml#/definitions/uint32 enum: [ 0, 1, 2, 3 ] default: 3 description: | Micbias voltage applied to the analog mic, valid voltages value are: 0 - 2.2v 1 - 2.55v 2 - 2.4v 3 - 2.8v '#sound-dai-cells': const: 0required: - compatible - reg - interruptsunevaluatedProperties: falseexamples: - | #include <dt-bindings/interrupt-controller/irq.h> i2c { #address-cells = <1>; #size-cells = <0>; audio-codec@10 { compatible = "maxim,max98090"; reg = <0x10>; interrupt-parent = <&gpx3>; interrupts = <2 IRQ_TYPE_EDGE_FALLING>; clocks = <&i2s0 0>; clock-names = "mclk"; #sound-dai-cells = <0>; }; };Kindly help me find a solution to this.
Thanks.
Statistics: Posted by electronics_enthu — Wed Nov 06, 2024 12:12 pm