He creado una capa de audio personalizada utilizando el códec TLV320AIC3107 y aquí hay un diagrama esquemático.
ParalaconexiónconBeagleBoneBlack,refieroalacapadeaudioqueestádisponibleenelmercado.Aquíhayunenlace:
Instalé la superposición DT de la siguiente manera:
root @ beaglebone: ~ # echo BB-BONE-AUDI-02 > /sys/devices/bone_capemgr.8/slots
root @ beaglebone: ~ # dmesg
[ 254.659557] bone-capemgr bone_capemgr.8: part_number 'BB-BONE-AUDI-02', version 'N/A'
[ 254.659641] bone-capemgr bone_capemgr.8: slot #7: generic override
[ 254.659659] bone-capemgr bone_capemgr.8: bone: Using override eeprom data at slot 7
[ 254.659677] bone-capemgr bone_capemgr.8: slot #7: 'Override Board Name,00A0,Override Manuf,BB-BONE-AUDI-02'
[ 254.659784] bone-capemgr bone_capemgr.8: slot #7: Requesting part number/version based 'BB-BONE-AUDI-02-00A0.dtbo
[ 254.659802] bone-capemgr bone_capemgr.8: slot #7: Requesting firmware 'BB-BONE-AUDI-02-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[ 254.668469] bone-capemgr bone_capemgr.8: slot #7: dtbo 'BB-BONE-AUDI-02-00A0.dtbo' loaded; converting to live tree
[ 254.668961] bone-capemgr bone_capemgr.8: slot #7: #4 overlays
[ 254.678886] of_get_named_gpio_flags: can't parse gpios property
[ 254.682895] 1-0018 supply IOVDD not found, using dummy regulator
[ 254.682971] 1-0018 supply DVDD not found, using dummy regulator
[ 254.683035] 1-0018 supply AVDD not found, using dummy regulator
[ 254.683096] 1-0018 supply DRVDD not found, using dummy regulator
[ 254.692524] davinci_evm sound.13: tlv320aic3x-hifi <-> 48038000.mcasp mapping ok
[ 254.701641] bone-capemgr bone_capemgr.8: slot #7: Applied #4 overlays.
Lo que parece haberse instalado con éxito. Para confirmar:
root@beaglebone:~# cat /proc/asound/devices
2: [ 0- 0]: digital audio playback
3: [ 0- 0]: digital audio capture
4: [ 0] : control
33: : timer
root@beaglebone:~# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=EVM
DA830 EVM,
Default Audio Device
sysdefault:CARD=EVM
DA830 EVM,
Default Audio Device
root@beaglebone:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: EVM [DA830 EVM], device 0: AIC3X tlv320aic3x-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
Ahora intento reproducir el archivo wave:
root@beaglebone:~/Desktop# aplay -vv test_stereo_8000Hz_8bit_PCM.wav
Playing WAVE 'test_stereo_8000Hz_8bit_PCM.wav' : Unsigned 8 bit, Rate 8000 Hz, Stereo
Plug PCM: Linear conversion PCM (S16_LE)
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : U8
subformat : STD
channels : 2
rate : 8000
exact rate : 8000 (8000/1)
msbits : 8
buffer_size : 16000
period_size : 1000
period_time : 125000
tstamp_mode : NONE
period_step : 1
avail_min : 1000
period_event : 0
start_threshold : 16000
stop_threshold : 16000
silence_threshold: 0
silence_size : 0
boundary : 2097152000
Slave: Hardware PCM card 0 'DA830 EVM' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 8000
exact rate : 8000 (8000/1)
msbits : 16
buffer_size : 16000
period_size : 1000
period_time : 125000
tstamp_mode : NONE
period_step : 1
avail_min : 1000
period_event : 0
start_threshold : 16000
stop_threshold : 16000
silence_threshold: 0
silence_size : 0
boundary : 2097152000
appl_ptr : 0
hw_ptr : 0
####### + | 19%
después de que la placa se bloquee y no responda.
Cuando verifico dmesg, veo el siguiente error:
root@beaglebone:~/Desktop# dmesg
[ 904.298073] omap_i2c 4819c000.i2c: Arbitration lost
[ 905.330496] omap_i2c 4819c000.i2c: controller timed out
¿Alguien tiene idea? ¿Qué pasa?