* Request for help CM109 on arm board
@ 2012-02-07 16:00 Jonathan Andrews
  2012-02-07 20:35 ` Jonathan Andrews
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Andrews @ 2012-02-07 16:00 UTC (permalink / raw)
  To: alsa-devel
Hi all,
I've written an application on the PC that works with alsa, it uses 8
mono 22050Hz 16 bit audio channels via alsa.
I'm trying to port the application to an Arm board with only a CM109 via
USB.
I have a working alsa library, I can play raw audio via the aplay
utility and record via arecord ok.
My problem is I don't understand the alsa configuration in enough detail
to get it right. At the moment I have an alsa.conf cribbed from google,
seems to work but only as a passthough.
# cat /usr/share/alsa/alsa.conf_old 
pcm.!default {
    type hw
    card 0
}
ctl.!default {
    type hw
    card 0
} 
ARM / # lsmod
snd_usb_audio 65715 0 - Live 0xbf082000
snd_hwdep 4756 1 snd_usb_audio, Live 0xbf07b000
snd_pcm 54351 1 snd_usb_audio, Live 0xbf062000
snd_timer 14870 1 snd_pcm, Live 0xbf058000
snd_page_alloc 3336 1 snd_pcm, Live 0xbf052000
snd_usbmidi_lib 14853 1 snd_usb_audio, Live 0xbf048000
snd_rawmidi 14657 1 snd_usbmidi_lib, Live 0xbf03d000
snd_seq_device 4675 1 snd_rawmidi, Live 0xbf036000
cm109 6943 0 - Live 0xbf011000
dm9601 5583 0 - Live 0xbf00a000
usbnet 11888 1 dm9601, Live 0xbf000000
ARM / # cat /proc/asound/cards 
 0 [default        ]: USB-Audio - Generic USB Audio Device   
                      Generic USB Audio Device    at usb-ep93xx-3, full
speed
ARM / # cat /proc/asound/devices 
  0: [ 0]   : control
 16: [ 0- 0]: digital audio playback
 24: [ 0- 0]: digital audio capture
 33:        : timer
ARM / # 
I do not have enough of a machine or distribution to use the alsaconf
utility. Could someone help me with an alsa.conf that will do what
roughly what I am after : 
IE to allow an application to open N channels each 22050Hz 16 bit mono
to be mixed and resampled for an output via a CM109 that only provides
44.1 or 48Khz 16 bit interleaved ... phew ...
Thanks,
Jon
^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: Request for help CM109 on arm board
  2012-02-07 16:00 Request for help CM109 on arm board Jonathan Andrews
@ 2012-02-07 20:35 ` Jonathan Andrews
  2012-02-07 21:44   ` Clemens Ladisch
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Andrews @ 2012-02-07 20:35 UTC (permalink / raw)
  To: alsa-devel
Its bad form, but here is a follow up to my own thread in the hope
somebody will guide my through this maze ?
ALSA lib timer.c:189:(snd_timer_open_noupdate) Unknown timer
hw:CLASS=3,SCLASS=0,CARD=0,DEV=0,SUBDEV=0
ALSA lib timer.c:189:(snd_timer_open_noupdate) Unknown timer
hw:CLASS=3,SCLASS=0,CARD=0,DEV=0,SUBDEV=0
ALSA lib pcm_direct.c:1118:(snd1_pcm_direct_initialize_poll_fd) unable
to open timer 'hw:CLASS=3,SCLASS=0,CARD=0,DEV=0,SUBDEV=0'
ALSA lib pcm_dmix.c:1095:(snd_pcm_dmix_open) unable to initialize
poll_fd
aplay: main:682: audio open error: No such file or directory
ARM # cat /usr/share/alsa/alsa.conf
pcm.snd_card {
    type hw
    card 0
    device 0
}
pcm.!default {
    type plug
    slave.pcm "dmixer"
}
 
pcm.dsp0 {
    type plug
    slave.pcm "dmixer"
}
pcm.dmixer  {
    type dmix
    ipc_key 1024
    slave {
        pcm "snd_card"
        period_time 0
        period_size 1024
        buffer_size 8192
        # periods 128
        rate 44100
    }
    bindings {
        0 0
        1 1
    }
}
 
ctl.mixer0 {
    type hw
    card 0
}
ARM # lsmod
snd_usb_audio 65715 0 - Live 0xbf082000
snd_hwdep 4756 1 snd_usb_audio, Live 0xbf07b000
snd_pcm 54351 1 snd_usb_audio, Live 0xbf062000
snd_timer 14870 1 snd_pcm, Live 0xbf058000
snd_page_alloc 3336 1 snd_pcm, Live 0xbf052000
snd_usbmidi_lib 14853 1 snd_usb_audio, Live 0xbf048000
snd_rawmidi 14657 1 snd_usbmidi_lib, Live 0xbf03d000
snd_seq_device 4675 1 snd_rawmidi, Live 0xbf036000
cm109 6943 0 - Live 0xbf011000
dm9601 5583 0 - Live 0xbf00a000
usbnet 11888 1 dm9601, Live 0xbf000000
this alsa.conf works, but with no digital mixer
pcm.!default {
    type hw
    card 0
}
ctl.!default {
    type hw
    card 0
}
# cat /proc/asound/version 
Advanced Linux Sound Architecture Driver Version 1.0.23.
ARM # cat /proc/asound/cards 
 0 [default        ]: USB-Audio - Generic USB Audio Device   
                      Generic USB Audio Device    at usb-ep93xx-3, full
speed
ARM # cat /proc/asound/devices 
  0: [ 0]   : control
 16: [ 0- 0]: digital audio playback
 24: [ 0- 0]: digital audio capture
 33:        : timer
http://alsa.opensrc.org/Dmix
NOTE: For ALSA 1.0.9rc2 and higher you don't need to setup dmix for
analogue output. Dmix is enabled by default for soundcards which don't
support hardware mixing. You still need to set it up for digital
outputs.
Yea .....  right .....
^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: Request for help CM109 on arm board
  2012-02-07 20:35 ` Jonathan Andrews
@ 2012-02-07 21:44   ` Clemens Ladisch
  2012-02-07 22:21     ` Jonathan Andrews
  0 siblings, 1 reply; 4+ messages in thread
From: Clemens Ladisch @ 2012-02-07 21:44 UTC (permalink / raw)
  To: alsa-devel
Jonathan Andrews wrote:
> ALSA lib timer.c:189:(snd_timer_open_noupdate) Unknown timer hw:CLASS=3,SCLASS=0,CARD=0,DEV=0,SUBDEV=0
> ARM # cat /usr/share/alsa/alsa.conf
> ...
You have deleted alsa-lib's basic device definitions.  Device-specific
definitions are supposed to go into /usr/share/alsa/cards/.  Your
definitions look as if they are supposed to go into /etc/asound.conf.
Regards,
Clemens
^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: Request for help CM109 on arm board
  2012-02-07 21:44   ` Clemens Ladisch
@ 2012-02-07 22:21     ` Jonathan Andrews
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Andrews @ 2012-02-07 22:21 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel
On Tue, 2012-02-07 at 22:44 +0100, Clemens Ladisch wrote:
> Jonathan Andrews wrote:
> > ALSA lib timer.c:189:(snd_timer_open_noupdate) Unknown timer hw:CLASS=3,SCLASS=0,CARD=0,DEV=0,SUBDEV=0
> 
> > ARM # cat /usr/share/alsa/alsa.conf
> > ...
> 
> You have deleted alsa-lib's basic device definitions.  Device-specific
> definitions are supposed to go into /usr/share/alsa/cards/.  Your
> definitions look as if they are supposed to go into /etc/asound.conf.
> 
Thanks for the reply.  I've failed to create the basic device
definitions..
 
I have alsa-lib-1.0.25 cross compiled from source, the libs are
installed and alsa-utils-1.0.25 has been built against it.
The snag is alsaconf seems broken (fails to exec) and as I don't have an
ldd that works with arm i'm a bit bust, everything else in alsa-utils
seems to at least execute ....
Do I need to split the config across files, I only want one device on
this board and i'm limited in space. I have kernel+kernel modules
+busybox+some libs+alsautils partially working and i'm out of flash..
I figured as I need only one device on one board that will never change
I could hand code it, is it a requirement to split the config. This is
destined to be a single task machine.
Thanks,
Jon
^ permalink raw reply	[flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-07 22:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-07 16:00 Request for help CM109 on arm board Jonathan Andrews
2012-02-07 20:35 ` Jonathan Andrews
2012-02-07 21:44   ` Clemens Ladisch
2012-02-07 22:21     ` Jonathan Andrews
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).