Skip to contentSkip to conversation

ALSA Driver Testing

DISCUSSION Prince John 2 participants 3 messages Jul 16, 2003 – Jul 26, 2003

lore
Share & tools
lore
#0 lore raw

Hi,
I'm facing some problems while testing a driver developed for a Hitachi SH4 based board. The board has an AC97 codec and codec controller.
I'm working as 'root'. The devices are created with 'snddevices' and all modules are loaded properly.

When tried to test the driver by running 'amixer' and 'aplay' but it fails during 'snd_ctl_open_noupdate' call
in library.

# ./aplay -D hw:0,0
ALSA lib pcm.c:1906:(snd_pcm_open_noupdate) Unknown
PCM hw:0,0
aplay: main:480: audio open error: No such file or
directory
# ./aplay -D Aspen
ALSA lib pcm.c:1906:(snd_pcm_open_noupdate) Unknown
PCM Aspen
aplay: main:480: audio open error: No such file or
directory
# ./amixer
ALSA lib control.c:612:(snd_ctl_open_noupdate) Invalid
CTL default
amixer: Mixer attach default error: No such file or
directory

---------------------
Looks like, both utilities are looking for some config files. The error happens during the search of some sound
config files in conf.c file of ALSA lib.

The .asoundrc file is kept at / and /root. The alsa.conf file is placed in /alsa and /usr/share/alsa

# cat /root/.asoundrc
pcm.Aspen {
  type hw
  card 0
}

ctl.Aspen {
type hw
card 0
}
#

# ls -l /alsa/
-rwxrwxrwx    1 root     audio        7329 Jul 14 
2003 alsa.conf
drwxrwxrwx    2 root     audio        1024 Jul 15 
2003 cards
drwxrwxrwx    2 root     audio        1024 Jul 15 
2003 pcm
# ls -l /dev/snd
lrwxrwxrwx    1 root     root           16 Jun  7
14:48 /dev/snd -> /proc/asound
/dev
# cat /proc/asound/card0/id
Aspen
# cat /proc/asound/devices
  1:       : sequencer
  0: [0- 0]: ctl
 16: [0- 0]: digital audio playback
 24: [0- 0]: digital audio capture
 33:       : timer
#
# ls -l  /proc/asound/dev/
crw-rw-rw-    1 root     root     116,   0 Jun  7
15:43 controlC0
crw-rw-rw-    1 root     root     116,  24 Jun  7
15:43 pcmC0D0c
crw-rw-rw-    1 root     root     116,  16 Jun  7
14:30 pcmC0D0p
crw-rw-rw-    1 root     root     116,   1 Jun  7
15:43 seq
crw-rw-rw-    1 root     root     116,  33 Jun  7
15:43 timer

-----------------------

Am I missing any config files or path settings ? Can somebody please give the info on how & where to setup the config files for a new driver?

Thanks and regards,
Prince

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0

#1 lore raw

At Wed, 16 Jul 2003 07:40:08 -0700 (PDT),

Quoted 7 lines · Prince John

Looks like, both utilities are looking for some config files. The error happens during the search of some sound
config files in conf.c file of ALSA lib.

The .asoundrc file is kept at / and /root. The alsa.conf file is placed in /alsa and /usr/share/alsa

/ is not referred at all.
the file is either ~/.asoundrc or /etc/asound.conf.

Quoted 4 lines
# ls -l /dev/snd
lrwxrwxrwx    1 root     root           16 Jun  7
14:48 /dev/snd -> /proc/asound
/dev

ok, you're using an old version...

Quoted 3 lines

Am I missing any config files or path settings ? Can somebody please give the info on how & where to setup the config files for a new driver?

how about checking via strace which files are opened?

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0

#2 lore raw

config

Quoted 22 lines
Quoted 6 lines

files. The error happens during the search of some sound
config files in conf.c file of ALSA lib.

The .asoundrc file is kept at / and /root. The
alsa.conf file is placed in /alsa and

/usr/share/alsa

/ is not referred at all.
the file is either ~/.asoundrc or /etc/asound.conf.

Quoted 4 lines
# ls -l /dev/snd
lrwxrwxrwx    1 root     root           16 Jun  7
14:48 /dev/snd -> /proc/asound
/dev

ok, you're using an old version...

Quoted 1 line

Am I missing any config files or path settings ?

Can

Quoted 1 line

somebody please give the info on how & where to

Quoted 10 lines

setup

Quoted 1 line

the config files for a new driver?

how about checking via strace which files are
opened?

Takashi

Thanks for the response. The problem got solved by placing 'alsa.conf' file in <install-prefix>/share/alsa directory.

Thanks,
Prince

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01