How do I make a device in the kernel? Could you please shed some light?

When you say"I2S and I2C are correctly connected", do you mean that I need
to have the audio codec chip connected to these lines in order for the I2S
to work? Can't I just pump out I2S signals by playing some wav file and
capture it via the logic analyzer?.

Kind Regards
*Vinay Divakar*
Firmware Engineer at Adroit, New Zealand
LinkedIn <http://www.linkedin.com/in/vinaydivakar> | Website
<https://deeplyembedded.org/> | Github <https://github.com/deeplyembeddedWP>
 | Freelance <https://www.freelancer.in/u/deeplyembedded>

On Wed, 14 Aug 2019 at 21:02, Yiling Cao <yiling....@gmail.com> wrote:

> You need to make a device in the kernel, to initialize/register the audio
> codec, given I2S and I2C are correctly connected.
>
> On Wed, Aug 14, 2019 at 2:03 PM Vinay Divakar <vinaydivakar1...@gmail.com>
> wrote:
>
>> I am using BeagleBone Green. I don't have anything connected to the i2s
>> signals except for the logic analyzer.
>>
>> Nope, haven't modified the kernel. Using the same one got from the IoT
>> Debian Flasher image from the latest image on beagleboard.org.
>>
>> Kind Regards
>> *Vinay Divakar*
>> Firmware Engineer at Adroit, New Zealand
>> LinkedIn <http://www.linkedin.com/in/vinaydivakar> | Website
>> <https://deeplyembedded.org/> | Github
>> <https://github.com/deeplyembeddedWP> | Freelance
>> <https://www.freelancer.in/u/deeplyembedded>
>>
>> On Wed, 14 Aug 2019 at 17:49, Yiling Cao <yiling....@gmail.com> wrote:
>>
>>> can you send us the audio part of schematics?
>>>
>>> have you modified kernel? 2018-oct-5 says kernel not modified.
>>>
>>> On Wed, Aug 14, 2019 at 12:16 AM <vinaydivakar1...@gmail.com> wrote:
>>>
>>>>
>>>> I am unable to get the I2S signals from the beaglebone. Below are the
>>>> things I did.
>>>>
>>>>    1. I first disabled the HDMI audio as described here
>>>>    <https://github.com/beagleboard/linux/issues/101>.
>>>>    2. I am using the P9.31 (SCLK), P9.28 (Data0) and P9.29(FSX/WS).
>>>>    Running sudo /opt/scripts/tools/version.sh gives the following.
>>>>
>>>> debian@beaglebone:/boot$ sudo /opt/scripts/tools/version.sh
>>>> [sudo] password for debian:
>>>> git:/opt/scripts/:[1aa73453b2c980b75e31e83dab7dd8b6696f10c7]
>>>> eeprom:[A335BNLT00C02315BBBK4ACD]
>>>> model:[TI_AM335x_BeagleBone_Black]
>>>> dogtag:[BeagleBoard.org Debian Image 2018-10-07]
>>>> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 
>>>> 2018.09-00002-g0b54a51eee]:[location: dd MBR]
>>>> kernel:[4.14.71-ti-r80]
>>>> nodejs:[v6.14.4]
>>>> uboot_overlay_options:[enable_uboot_overlays=1]
>>>> uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/BB-BONE-AUDI-02.dtbo]
>>>> uboot_overlay_options:[disable_uboot_overlay_audio=1]
>>>> uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo]
>>>> uboot_overlay_options:[enable_uboot_cape_universal=1]
>>>> pkg check: to individually upgrade run: [sudo apt install --only-upgrade 
>>>> <pkg>]
>>>> pkg:[bb-cape-overlays]:[4.4.20180928.0-0rcnee0~stretch+20180928]
>>>> pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
>>>> pkg:[kmod]:[23-2rcnee1~stretch+20171005]
>>>> pkg:[librobotcontrol]:[1.0.3-git20181005.0-0rcnee0~stretch+20181005]
>>>> pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
>>>> groups:[debian : debian adm kmem dialout cdrom floppy audio dip video 
>>>> plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep 
>>>> admin spi tisdk weston-launch xenomai]
>>>> cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 
>>>> root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M 
>>>> net.ifnames=0 quiet]
>>>> dmesg | grep pinctrl-single
>>>> [    1.107553] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 
>>>> size 568
>>>> dmesg | grep gpio-of-helper
>>>> [    1.119437] gpio-of-helper ocp:cape-universal: ready
>>>> END
>>>>
>>>>
>>>>    1. Running perl /opt/scripts/device/bone/show-pins.pl gives the
>>>>    following.
>>>>
>>>> debian@beaglebone:/boot$ perl /opt/scripts/device/bone/show-pins.pl
>>>> P8.25 / eMMC d0                    0  U7 fast rx  up  1 mmc 1 d0         
>>>> mmc@481d8000 (pinmux_emmc_pins)
>>>> P8.24 / eMMC d1                    1  V7 fast rx  up  1 mmc 1 d1         
>>>> mmc@481d8000 (pinmux_emmc_pins)
>>>> P8.05 / eMMC d2                    2  R8 fast rx  up  1 mmc 1 d2         
>>>> mmc@481d8000 (pinmux_emmc_pins)
>>>> P8.06 / eMMC d3                    3  T8 fast rx  up  1 mmc 1 d3         
>>>> mmc@481d8000 (pinmux_emmc_pins)
>>>> P8.23 / eMMC d4                    4  U8 fast rx  up  1 mmc 1 d4         
>>>> mmc@481d8000 (pinmux_emmc_pins)
>>>> P8.22 / eMMC d5                    5  V8 fast rx  up  1 mmc 1 d5         
>>>> mmc@481d8000 (pinmux_emmc_pins)
>>>> P8.03 / eMMC d6                    6  R9 fast rx  up  1 mmc 1 d6         
>>>> mmc@481d8000 (pinmux_emmc_pins)
>>>> P8.04 / eMMC d7                    7  T9 fast rx  up  1 mmc 1 d7         
>>>> mmc@481d8000 (pinmux_emmc_pins)
>>>> P8.19                              8 U10 fast rx down 7 gpio 0.22        
>>>> ocp/P8_19_pinmux (pinmux_P8_19_default_pin)
>>>> P8.13                              9 T10 fast rx down 7 gpio 0.23        
>>>> ocp/P8_13_pinmux (pinmux_P8_13_default_pin)
>>>> P8.14                             10 T11 fast rx down 7 gpio 0.26        
>>>> ocp/P8_14_pinmux (pinmux_P8_14_default_pin)
>>>> P8.17                             11 U12 fast rx down 7 gpio 0.27        
>>>> ocp/P8_17_pinmux (pinmux_P8_17_default_pin)
>>>> P8.12                             12 T12 fast rx down 7 gpio 1.12        
>>>> ocp/P8_12_pinmux (pinmux_P8_12_default_pin)
>>>> P8.11                             13 R12 fast rx down 7 gpio 1.13        
>>>> ocp/P8_11_pinmux (pinmux_P8_11_default_pin)
>>>> P8.16                             14 V13 fast rx down 7 gpio 1.14        
>>>> ocp/P8_16_pinmux (pinmux_P8_16_default_pin)
>>>> P8.15                             15 U13 fast rx down 7 gpio 1.15        
>>>> ocp/P8_15_pinmux (pinmux_P8_15_default_pin)
>>>> P9.15                             16 R13 fast rx down 7 gpio 1.16        
>>>> ocp/P9_15_pinmux (pinmux_P9_15_default_pin)
>>>> P9.23                             17 V14 fast rx down 7 gpio 1.17        
>>>> ocp/P9_23_pinmux (pinmux_P9_23_default_pin)
>>>> P9.14                             18 U14 fast rx down 7 gpio 1.18        
>>>> ocp/P9_14_pinmux (pinmux_P9_14_default_pin)
>>>> P9.16                             19 T14 fast rx down 7 gpio 1.19        
>>>> ocp/P9_16_pinmux (pinmux_P9_16_default_pin)
>>>> P9.11                             28 T17 fast rx down 7 gpio 0.30        
>>>> ocp/P9_11_pinmux (pinmux_P9_11_default_pin)
>>>> P9.13                             29 U17 fast rx down 7 gpio 0.31        
>>>> ocp/P9_13_pinmux (pinmux_P9_13_default_pin)
>>>> P9.12                             30 U18 fast rx down 7 gpio 1.28        
>>>> ocp/P9_12_pinmux (pinmux_P9_12_default_pin)
>>>> P8.26                             31  V6 fast rx down 7 gpio 1.29        
>>>> ocp/P8_26_pinmux (pinmux_P8_26_default_pin)
>>>> P8.21 / eMMC clk                  32  U9 fast rx  up  2 mmc 1 clk        
>>>> mmc@481d8000 (pinmux_emmc_pins)
>>>> P8.20 / eMMC cmd                  33  V9 fast rx  up  2 mmc 1 cmd        
>>>> mmc@481d8000 (pinmux_emmc_pins)
>>>> P9.15                             34 T13 fast rx  up  7 gpio 2.00
>>>> P8.18                             35 V12 fast rx down 7 gpio 2.01        
>>>> ocp/P8_18_pinmux (pinmux_P8_18_default_pin)
>>>> P8.07                             36  R7 fast rx down 7 gpio 2.02        
>>>> ocp/P8_07_pinmux (pinmux_P8_07_default_pin)
>>>> P8.08                             37  T7 fast rx down 7 gpio 2.03        
>>>> ocp/P8_08_pinmux (pinmux_P8_08_default_pin)
>>>> P8.10                             38  U6 fast rx down 7 gpio 2.04        
>>>> ocp/P8_10_pinmux (pinmux_P8_10_default_pin)
>>>> P8.09                             39  T6 fast rx down 7 gpio 2.05        
>>>> ocp/P8_09_pinmux (pinmux_P8_09_default_pin)
>>>> P8.45 / hdmi / sysboot 0          40  R1 fast         0 lcd d0           
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.46 / hdmi / sysboot 1          41  R2 fast         0 lcd d1           
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.43 / hdmi / sysboot 2          42  R3 fast         0 lcd d2           
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.44 / hdmi / sysboot 3          43  R4 fast         0 lcd d3           
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.41 / hdmi / sysboot 4          44  T1 fast         0 lcd d4           
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.42 / hdmi / sysboot 5          45  T2 fast         0 lcd d5           
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.39 / hdmi / sysboot 6          46  T3 fast         0 lcd d6           
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.40 / hdmi / sysboot 7          47  T4 fast         0 lcd d7           
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.37 / hdmi / sysboot 8          48  U1 fast         0 lcd d8           
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.38 / hdmi / sysboot 9          49  U2 fast         0 lcd d9           
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.36 / hdmi / sysboot 10         50  U3 fast         0 lcd d10          
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.34 / hdmi / sysboot 11         51  U4 fast         0 lcd d11          
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.35 / hdmi / sysboot 12         52  V2 fast         0 lcd d12          
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.33 / hdmi / sysboot 13         53  V3 fast         0 lcd d13          
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.31 / hdmi / sysboot 14         54  V4 fast         0 lcd d14          
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.32 / hdmi / sysboot 15         55  T5 fast         0 lcd d15          
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.27 / hdmi                      56  U5 fast    down 0 lcd vsync        
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.29 / hdmi                      57  R5 fast    down 0 lcd hsync        
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.28 / hdmi                      58  V5 fast    down 0 lcd pclk         
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P8.30 / hdmi                      59  R6 fast    down 0 lcd oe/acb       
>>>> 0-0070 (nxp_hdmi_bonelt_pins)
>>>> P9.22 / spi boot clk              84 A17 fast rx down 7 gpio 0.02        
>>>> ocp/P9_22_pinmux (pinmux_P9_22_default_pin)
>>>> P9.21 / spi boot in               85 B17 fast rx down 7 gpio 0.03        
>>>> ocp/P9_21_pinmux (pinmux_P9_21_default_pin)
>>>> P9.18 / spi boot out              86 B16 fast rx down 7 gpio 0.04        
>>>> ocp/P9_18_pinmux (pinmux_P9_18_default_pin)
>>>> P9.17 / spi boot cs               87 A16 fast rx down 7 gpio 0.05        
>>>> ocp/P9_17_pinmux (pinmux_P9_17_default_pin)
>>>> P9.42a                            89 C18 fast rx down 7 gpio 0.07        
>>>> ocp/P9_42_pinmux (pinmux_P9_42_default_pin)
>>>> P9.20 / cape i²c sda              94 D18 fast rx  up  3 i²c 2 sda        
>>>> ocp/P9_20_pinmux (pinmux_P9_20_default_pin)
>>>> P9.19 / cape i²c scl              95 D17 fast rx  up  3 i²c 2 scl        
>>>> ocp/P9_19_pinmux (pinmux_P9_19_default_pin)
>>>> P9.26                             96 D16 fast rx down 7 gpio 0.14        
>>>> ocp/P9_26_pinmux (pinmux_P9_26_default_pin)
>>>> P9.24                             97 D15 fast rx down 7 gpio 0.15        
>>>> ocp/P9_24_pinmux (pinmux_P9_24_default_pin)
>>>> P9.31 / hdmi audio clk           100 A13 fast rx down 7 gpio 3.14        
>>>> ocp/P9_31_pinmux (pinmux_P9_31_default_pin)
>>>> P9.29 / hdmi audio fs            101 B13 fast rx down 7 gpio 3.15        
>>>> ocp/P9_29_pinmux (pinmux_P9_29_default_pin)
>>>> P9.30                            102 D12 fast rx down 7 gpio 3.16        
>>>> ocp/P9_30_pinmux (pinmux_P9_30_default_pin)
>>>> P9.28 / hdmi audio data          103 C12 fast rx down 7 gpio 3.17        
>>>> ocp/P9_28_pinmux (pinmux_P9_28_default_pin)
>>>> P9.42b                           104 B12 fast rx down 7 gpio 3.18        
>>>> ocp/P9_92_pinmux (pinmux_P9_92_default_pin)
>>>> P9.27                            105 C13 fast rx down 7 gpio 3.19        
>>>> ocp/P9_27_pinmux (pinmux_P9_27_default_pin)
>>>> P9.41                            106 D13 fast rx down 7 gpio 3.20        
>>>> ocp/P9_91_pinmux (pinmux_P9_91_default_pin)
>>>> P9.25 / audio osc                107 A14 fast rx down 7 gpio 3.21        
>>>> ocp/P9_25_pinmux (pinmux_P9_25_default_pin)
>>>> P9.41 / jtag emu3                109 D14 fast rx down 7 gpio 0.20        
>>>> ocp/P9_41_pinmux (pinmux_P9_41_default_pin)
>>>>
>>>>
>>>>    1. I have hooked my beaglebone's i2s signals to a logic analyzer
>>>>    and use aplay to play a .wav file as shown below.
>>>>
>>>> debian@beaglebone:~/UnoExampleTracks$ aplay 001_Sweeper.wav
>>>>
>>>> When I try playing the track, I get the following errors and no signals
>>>> on the i2s bus:
>>>>
>>>> debian@beaglebone:~/UnoExampleTracks$ aplay 001_Sweeper.wav
>>>> ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
>>>> ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver 
>>>> returned error: No such file or directory
>>>> ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
>>>> ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat 
>>>> returned error: No such file or directory
>>>> ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
>>>> ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer 
>>>> returned error: No such file or directory
>>>> ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or 
>>>> directory
>>>> ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
>>>> aplay: main:788: audio open error: No such file or directory
>>>>
>>>> Below is the kernel version I am using:
>>>>
>>>> debian@beaglebone:~/UnoExampleTracks$ uname -a
>>>> Linux beaglebone 4.14.71-ti-r80 #1 SMP PREEMPT Fri Oct 5 23:50:11 UTC 2018 
>>>> armv7l GNU/Linux
>>>>
>>>> Also, when I run aplay -l, I get the following:
>>>>
>>>> debian@beaglebone:~/UnoExampleTracks$ aplay -l
>>>> aplay: device_list:270: no soundcards found...
>>>>
>>>>
>>>> My intent is to connect a pcm5102 DAC module to the i2s lines and go
>>>> from there. Before moving to the pcm5102, I decided it would be a good idea
>>>> to first get the i2s bus up and running. Could someone please provide
>>>> insights o what I may be doing wrong.
>>>>
>>>> --
>>>> For more options, visit http://beagleboard.org/discuss
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "BeagleBoard" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to beagleboard+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/beagleboard/76a210cd-bb53-451f-8234-1cb3ebaa87e1%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/beagleboard/76a210cd-bb53-451f-8234-1cb3ebaa87e1%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>>>
>>> --
>>> Yiling Cao
>>> http://ariaboard.com/
>>> http://shanghainovotech.com/
>>>
>>> --
>>> For more options, visit http://beagleboard.org/discuss
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "BeagleBoard" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to beagleboard+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beagleboard/CAMMUdpJ-OLtRnBm-OjiPwu8hNN5m8wSZt-ugoZ0tySdEirvbOA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/beagleboard/CAMMUdpJ-OLtRnBm-OjiPwu8hNN5m8wSZt-ugoZ0tySdEirvbOA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> For more options, visit http://beagleboard.org/discuss
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "BeagleBoard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to beagleboard+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beagleboard/CAL4GkmPyL0NoxFKffP0iuW_-BeiiRYC3UKUbMNx65mB%3DQ1gOFA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/beagleboard/CAL4GkmPyL0NoxFKffP0iuW_-BeiiRYC3UKUbMNx65mB%3DQ1gOFA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Yiling Cao
> http://ariaboard.com/
> http://shanghainovotech.com/
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CAMMUdpJdCeY%2BMCxHYW7Xt56NSXA2H0tFPrz%2Bg_ZaURugzc4kAA%40mail.gmail.com
> <https://groups.google.com/d/msgid/beagleboard/CAMMUdpJdCeY%2BMCxHYW7Xt56NSXA2H0tFPrz%2Bg_ZaURugzc4kAA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAL4GkmMeSv69VVMkqJF9O1uMoyqVGaPp3Y%3DNpbPdgmxV3HkEuA%40mail.gmail.com.

Reply via email to