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.