ar71xx (big endian) and at91 (little endian) don't support hardware floating point operations, have less RAM and are much slower (orders of magnitude) than brcm2708 and ipq40xx.
I realise this is a rudimentary test but to test CPU performance I made a (albeit slow) python script to calculate all prime numbers up to 1,000,000.
700MHz brcm2708 took 5 minutes and 10 seconds
650MHz ar71xx took 5 minutes and 14 seconds
I think CPU speed is a red herring! Not to mention the fact that it is able to playback audio files perfectly (every 2nd time) and CPU usage is <10%. When recording we are talking a sample rate of 8000 bytes per second without any special encoding.
ar71xx (big endian) and at91 (little endian)
Sounds like we can rule out Endianness as well then!
Update4: playback and recording from USB audio working perfectly on 300MHz cns3xxx
Prime 1M benchmark for this board: 6 minutes 10 seconds
Working: brcm2708, ipq40xx and cns3xxx
Not working: ar71xx and at91
I really need to get this working on ar71xx! Is it worth me registering an issue on GitHub for whoever maintains ALSA Lib or something?
You're comparing apples and oranges, MIPS and ARM
Something that hit me, does the also occur if you try to capture in the same native format as the usb sound chip? You probably need to look in the driver or data sheet but it's usually 44.1/48kHz, 16-bit Stereo.
Wow yes that was a great find, thank you. That fixes the playback issue but now it won't let me record at all!
I created a /etc/asound.conf
pcm.dmixer {
type dmix
ipc_key 1024
ipc_key_add_uid false
ipc_perm 0666
slave {
pcm "hw:0,0"
### WARNING: do NOT add period_time, period_size or buffer_size here!!!>
rate 44100
}
bindings {
0 0
1 1
}
}
pcm.!default {
type plug
slave.pcm "dmixer"
}
But when I try to record now I get:
root@OpenWrt:~# arecord /tmp/test.wav
ALSA lib pcm_dmix.c:1043:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
arecord: main:828: audio open error: Invalid argument
This config seems to do the trick! Thanks for the help everyone and great find Pippo
/etc/asound.conf
pcm.!default {
type asym
playback.pcm
{
type plug
slave.pcm "dmix0"
}
capture.pcm
{
type plug
slave.pcm "dsnoop0"
}
}
ctl.!default {
type hw
card 0
}
ctl.dsp0 {
type hw
card 0
}
pcm.dsp0 {
type asym
capture.pcm "dsnoop0"
playback.pcm "dmix0"
}
pcm.asym0 {
type asym
capture.pcm "dsnoop0"
playback.pcm "dmix0"
}
pcm.dsnoop0 {
type dsnoop
ipc_key 1025
ipc_key_add_uid false
ipc_perm 0666
slave {
pcm "hw:0,0"
rate 48000
channels 1
# period_time 0
# period_size 4096
# buffer_size 131072
}
}
pcm.dmix0 {
type dmix
ipc_key 1024
ipc_key_add_uid false
ipc_perm 0666
slave {
pcm "hw:0,0"
### WARNING: do NOT add period_time, period_size or buffer_size here!!! ###
rate 48000
}
bindings {
0 0
1 1
}
}
ctl.mixer0 {
type hw
card 0
}
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.