BeamBang

  • 12 days ago
  • Joined Aug 27, 2023
  • 1 discussion
  • 4 posts
  • giuliomoro (which requires non-trivial amounts of firmware development),

    Hello Giulio,

    I'm back again with the prototype development. There are a couple of things I'd like to bring to this thread with the intention to redirect or collecting some ideas. As you said, setting the McASP in capture mode takes more effort than one could expect. I decided to go with the Beaglebone black since it has some advantages due to the components that are soldered on the board. For instance, there's an external oscillator Y4 with my desired sampling rate (24.576 MHz), and this can be redirected to feed the ahclkr.

    Current state

    I'm still struggling with the McASP connection. Since BBB is an embedded linux system, recording signals compels you to configure several modules, device tree files, subsystems, and units. I leave a ti application report, written in 2017, which breaks down the steps to compile a kernel version with these modifications. This other link might be useful if one needs to use a different kernel version. The error that I'm encountering is this:

    pcm_read:2152: read error: Input/output error.

    I wanted to show also a brief summary of the result of my configuration that still doesn't work.

    -------------------------------------------------------------------------------------------------
                                            McASP Report
    -------------------------------------------------------------------------------------------------
     ** pinmux **
     ''''''''''''
    pin 51 (PIN51): 48038000.mcasp (GPIO UNCLAIMED) function mcasp0_pins group mcasp0_pins
    pin 52 (PIN52): 48038000.mcasp (GPIO UNCLAIMED) function mcasp0_pins group mcasp0_pins
    pin 53 (PIN53): 48038000.mcasp (GPIO UNCLAIMED) function mcasp0_pins group mcasp0_pins
    pin 102 (PIN102): 48038000.mcasp (GPIO UNCLAIMED) function mcasp0_pins group mcasp0_pins
    P8.34 / hdmi / sysboot 11         51 fast rx      3 asp 0 rx hclk    mcasp@48038000 (mcasp0_pins)
    P8.35 / hdmi / sysboot 12         52 fast         3 asp 0 rx clk     mcasp@48038000 (mcasp0_pins)
    P8.33 / hdmi / sysboot 13         53 fast         3 asp 0 rx fs      mcasp@48038000 (mcasp0_pins)
    P9.30                            102 fast rx down 0 asp 0 data 0     mcasp@48038000 (mcasp0_pins)
        type: MUX_GROUP controller pinctrl-single group: mcasp0_pins (10) function: mcasp0_pins (10)
    -------------------------------------------------------------------------------------------------
     ** clock summary **
     '''''''''''''''''''
     clk_mcasp_fixed                      0        0        0    24576000          0     0  50000
        clk_mcasp                         0        0        0    24576000          0     0  50000
           mcasp1_fck                     0        1        0    24000000          0     0  50000
           mcasp0_fck                     0        1        0    24000000          0     0  50000
    -------------------------------------------------------------------------------------------------
     ** interrupts **
     ''''''''''''''''
     26:          0      INTC  80 Level     48038000.mcasp_tx
     27:          0      INTC  81 Level     48038000.mcasp_rx
     28:          0      INTC  84 Level     48038000.mcasp_common
    -------------------------------------------------------------------------------------------------
     ** soundcards **
     ''''''''''''''''
     0 [PCM5102a       ]: PCM5102a - PCM5102a
                          PCM5102a
    00-00: davinci-mcasp.0-pcm5102a-hifi pcm5102a-hifi-0 : davinci-mcasp.0-pcm5102a-hifi pcm5102a-hifi-0 : playback 1 : capture 1
    -------------------------------------------------------------------------------------------------
     ** capture soundcard **
     '''''''''''''''''''''''
    **** List of CAPTURE Hardware Devices ****
    card 0: PCM5102a [PCM5102a], device 0: davinci-mcasp.0-pcm5102a-hifi pcm5102a-hifi-0 [davinci-mcasp.0-pcm5102a-hifi pcm5102a-hifi-0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    null
        Discard all samples (playback) or generate zero samples (capture)
    hw:CARD=PCM5102a,DEV=0
        PCM5102a, davinci-mcasp.0-pcm5102a-hifi pcm5102a-hifi-0
        Direct hardware device without any conversions
    plughw:CARD=PCM5102a,DEV=0
        PCM5102a, davinci-mcasp.0-pcm5102a-hifi pcm5102a-hifi-0
        Hardware device with all software conversions
    default:CARD=PCM5102a
        PCM5102a, davinci-mcasp.0-pcm5102a-hifi pcm5102a-hifi-0
        Default Audio Device
    sysdefault:CARD=PCM5102a
        PCM5102a, davinci-mcasp.0-pcm5102a-hifi pcm5102a-hifi-0
        Default Audio Device
    dsnoop:CARD=PCM5102a,DEV=0
        PCM5102a, davinci-mcasp.0-pcm5102a-hifi pcm5102a-hifi-0
        Direct sample snooping device
    -------------------------------------------------------------------------------------------------
     ** errors **
     ''''''''''''
    [    4.822111] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    5.398165] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    5.454690] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
    -------------------------------------------------------------------------------------------------
     ** audio kernel modules **
     ''''''''''''''''''''''''''
    snd_soc_simple_card    24576  0
    snd_soc_simple_card_utils    24576  1 snd_soc_simple_card
    snd_soc_pcm5102a       16384  1
    snd_soc_davinci_mcasp    32768  2
    snd_soc_ti_udma        16384  1 snd_soc_davinci_mcasp
    snd_soc_ti_edma        16384  1 snd_soc_davinci_mcasp
    snd_soc_ti_sdma        16384  1 snd_soc_davinci_mcasp
    snd_soc_core          180224  7 snd_soc_davinci_mcasp,snd_soc_simple_card_utils,snd_soc_ti_sdma,snd_soc_ti_edma,snd_soc_pcm5102a,snd_soc_ti_udma,snd_soc_simple_card
    snd_pcm_dmaengine      16384  1 snd_soc_core
    snd_pcm                98304  3 snd_soc_davinci_mcasp,snd_pcm_dmaengine,snd_soc_core
    snd_timer              36864  1 snd_pcm
    snd                    65536  3 snd_timer,snd_soc_core,snd_pcm
    soundcore              16384  1 snd
    -------------------------------------------------------------------------------------------------

    I really appreciate any idea or kind of help to solve these issues.

  • giuliomoro
    I appreciate your very clear explanation!
    I'm planning to use these microphone arrays only as an acquisition system. Data would be post-processed offline from demultiplexing tasks in after. Every module (64 mics or more) is going to be part of a 1m diameter general array (512 mics), so distances between microphones to every slave board shouldn't be longer than 30cm. Synchronization should be accurate enough to get signals at 44.1kHz and 16 bit depth. About the master microcontroller, it's still not defined because it would depend on the process to make, for instance how convenient demultiplex, decimate and/or filtering the signal before sending to the PC can be. In this way, I believe making a network for this data traffic would be the most convenient option. This massive low-cost acoustic camera will be tested to characterize noise sources. Measurements will be carried out in the laboratory.
    If it were the case: how many analog signals can BBB read at the same time?

  • Thanks a lot for your support @giuliomoro
    I'm trying to build a massive acoustic camera with 512 microphones. If modules of 64 MEMS are possible, I'd need 8 BBB or PocketBeagle. I'd like to avoid using BeagleBone Black or PocketBeagle for the odd Fs (37.5kHz or 46.875kHz), as you already explained to me by mail. Even though Beagle documentation is easier to find. I'm not very clear with the pin connection with data lines in the BBB. I've found in some projects that it's common to use the GPIO_112, 115, 117, etc. to connect a digital microphone signal, so in theory, is it possible to convert any GPIO into a McASP? Also, I've seen assigning the clock either to the SPI SCK or a GPIO, how convenient is that?

    • I am developing an acquisition system with as many digital microphones (MEMS) as Bela can hold.
      The idea is to connect 64 of these MEMS (ICS-52000 TDK) to a 4-data-line-input Bela Cape. Since this is going to be used just for signal acquisition, I'm considering a master microcontroller to connect 8 Bela capes to my pc.
      Can anyone give me some suggestions about the master microcontroller and any extra consideration before I get these components?