All of lore.kernel.org
 help / color / mirror / Atom feed
* Setup when compiled in 2.6 kernel
@ 2006-02-19 17:21 John Talbut
  2006-02-19 19:00 ` Lee Revell
  0 siblings, 1 reply; 9+ messages in thread
From: John Talbut @ 2006-02-19 17:21 UTC (permalink / raw)
  To: alsa-devel

I have ALSA compiled in my 2.6.8 kernel and I have failed to get it to 
work after months, many hours, reading loads and trying just about 
everything suggested.

So, unless someone can point me straight to the answer, I am hoping to 
start a thread that could be the basis of a definitive howto on how to 
do this.  As far as I can see many people have had the same problem and 
all of them seem to have given up, or resorted to installing ALSA as a 
module.  There do seem to be some for whom it seemed to work from the start.

I am using the Debian unstable (etch) distribution.  My sound problems 
started when I upgraded from a 2.4 kernel, with ALSA installed as a 
module, to the 2.6.8 one.

The suggestion seems to be that if ALSA is compiled into the kernel that 
should be all that is needed.  Applications that use sound should just 
work.  So, first question, should this be so, and if not what else is 
needed?

I am looking for answers for someone who is computer literate and 
familiar with Linux but not at a programming level.  In other words, 
please do not just suggest trying this package or that - I have done all 
that.

Am I correct in believing that the kernel will set up and communicate 
with device files?  If so, how can I test them?  I have tried on various 
devices, e.g.

>  sox -V -b -c 1 -r 448000 -t alsa /dev/snd/pcmC2D0p -t .wav test.wav
and I get
> ALSA lib pcm.c:2099:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC2D0p sox: Failed reading /dev/snd/pcmC2D0p: cannot open audio device
and
 > cat /dos/Workspace/Music/originaldedodedo.wav > /dev/snd/pcmC2D0pD
and I get nothing.

If the device files are set up correctly, how do applications know which 
to use?  Gnome seems to be looking for an asound.conf file, but the 
http://alsa.opensrc.org/.asoundrc page suggests that it should not be 
necessary.  If it is necessary is there a straightforward way of 
creating one?  Does alsaconf do this?  If so, it is not much help in 
this case as it is also about installing modules, and just kicks out 
without doing anything.

OK, that will do for now and I will see what answers you all can come up 
with.  This is one or two more error messages and my set up.

# alsamixer -c2 ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid 
CTL hw:2
alsamixer: function snd_ctl_open failed for hw:2: No such file or directory

# /usr/bin/gnome-settings-daemon
gnome-settings-daemon: conf.c:3109: snd_config_update_free: Assertion 
`update->count > 0 && update->finfo' failed.
[1140368784,000,xklavier.c:XklStartListen/]     The backend does not 
require manual layout management - but it is provided by the application

Relevant parts of  kernel-source:

# Sound
#
CONFIG_SOUND=y

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_RAWMIDI=y
CONFIG_SND_SEQUENCER=y
CONFIG_SND_SEQ_DUMMY=y
# CONFIG_SND_MIXER_OSS is not set
# CONFIG_SND_PCM_OSS is not set
# CONFIG_SND_SEQUENCER_OSS is not set
CONFIG_SND_RTCTIMER=y
CONFIG_SND_VERBOSE_PRINTK=y
CONFIG_SND_DEBUG=y
# CONFIG_SND_DEBUG_MEMORY is not set
# CONFIG_SND_DEBUG_DETECT is not set

#
# Generic devices
#
CONFIG_SND_DUMMY=y
CONFIG_SND_VIRMIDI=y
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set

#
# ISA devices
#
#(none set)
#
# PCI devices
#
CONFIG_SND_AC97_CODEC=y
# (only
CONFIG_SND_ENS1371=y
#set)
#
# ALSA USB devices
#
CONFIG_SND_USB_AUDIO=y
#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
#
# USB support
#
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set

/proc/asound/cards:

0 [Dummy          ]: Dummy - Dummy
                      Dummy 1
1 [VirMIDI        ]: VirMIDI - VirMIDI
                      Virtual MIDI Card 1
2 [AudioPCI       ]: ENS1371 - Ensoniq AudioPCI
                      Ensoniq AudioPCI ENS1371 at 0xdf00, irq 10

/proc/asound/devices

1:       : sequencer
   0: [0- 0]: ctl
  16: [0- 0]: digital audio playback
  24: [0- 0]: digital audio capture
  33:       : timer
  32: [1- 0]: ctl
  43: [1- 3]: raw midi
  42: [1- 2]: raw midi
  41: [1- 1]: raw midi
  40: [1- 0]: raw midi
  64: [2- 0]: ctl
  72: [2- 0]: raw midi
  81: [2- 1]: digital audio playback
  80: [2- 0]: digital audio playback
  88: [2- 0]: digital audio capture

  /dev/snd:

controlC0  hwC1D2  midiC0D0  midiC1D2  midiC2D4  midiC3D6  pcmC0D4c 
pcmC1D1c  pcmC1D6c   pcmC2D2p  pcmC2D7p  pcmC3D4p
controlC1  hwC1D3  midiC0D1  midiC1D3  midiC2D5  midiC3D7  pcmC0D4p 
pcmC1D1p  pcmC1D6p   pcmC2D3c  pcmC3D0c  pcmC3D5c
controlC2  hwC2D0  midiC0D2  midiC1D4  midiC2D6  pcmC0D0c  pcmC0D5c 
pcmC1D2c  pcmC1D7c   pcmC2D3p  pcmC3D0p  pcmC3D5p
controlC3  hwC2D1  midiC0D3  midiC1D5  midiC2D7  pcmC0D0p  pcmC0D5p 
pcmC1D2p  pcmC1D7p   pcmC2D4c  pcmC3D1c  pcmC3D6c
hwC0D0     hwC2D2  midiC0D4  midiC1D6  midiC3D0  pcmC0D1c  pcmC0D6c 
pcmC1D3c  pcmC2D0c   pcmC2D4p  pcmC3D1p  pcmC3D6p
hwC0D1     hwC2D3  midiC0D5  midiC1D7  midiC3D1  pcmC0D1p  pcmC0D6p 
pcmC1D3p  pcmC2D0p   pcmC2D5c  pcmC3D2c  pcmC3D7c
hwC0D2     hwC3D0  midiC0D6  midiC2D0  midiC3D2  pcmC0D2c  pcmC0D7c 
pcmC1D4c  pcmC2D0pD  pcmC2D5p  pcmC3D2p  pcmC3D7p
hwC0D3     hwC3D1  midiC0D7  midiC2D1  midiC3D3  pcmC0D2p  pcmC0D7p 
pcmC1D4p  pcmC2D1c   pcmC2D6c  pcmC3D3c  seq
hwC1D0     hwC3D2  midiC1D0  midiC2D2  midiC3D4  pcmC0D3c  pcmC1D0c 
pcmC1D5c  pcmC2D1p   pcmC2D6p  pcmC3D3p  timer
hwC1D1     hwC3D3  midiC1D1  midiC2D3  midiC3D5  pcmC0D3p  pcmC1D0p 
pcmC1D5p  pcmC2D2c   pcmC2D7c  pcmC3D4c






-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Setup when compiled in 2.6 kernel
  2006-02-19 17:21 Setup when compiled in 2.6 kernel John Talbut
@ 2006-02-19 19:00 ` Lee Revell
  2006-02-19 19:46   ` John Talbut
  0 siblings, 1 reply; 9+ messages in thread
From: Lee Revell @ 2006-02-19 19:00 UTC (permalink / raw)
  To: John Talbut; +Cc: alsa-devel

On Sun, 2006-02-19 at 17:21 +0000, John Talbut wrote:
> Am I correct in believing that the kernel will set up and communicate 
> with device files?  If so, how can I test them?  I have tried on
> various 
> devices, e.g.
> 
> >  sox -V -b -c 1 -r 448000 -t alsa /dev/snd/pcmC2D0p -t .wav test.wav
> and I get
> > ALSA lib pcm.c:2099:(snd_pcm_open_noupdate) Unknown
> PCM /dev/snd/pcmC2D0p sox: Failed reading /dev/snd/pcmC2D0p: cannot
> open audio device
> and
>  > cat /dos/Workspace/Music/originaldedodedo.wav > /dev/snd/pcmC2D0pD
> and I get nothing. 

This is not how ALSA works, you can't just cat things to the device
file.  The interface to ALSA is through alsa-lib.

What happens if you start SIMPLE:

aplay file.wav

?



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Setup when compiled in 2.6 kernel
  2006-02-19 19:00 ` Lee Revell
@ 2006-02-19 19:46   ` John Talbut
  2006-02-19 19:53     ` Lee Revell
  2006-02-20  8:21     ` Clemens Ladisch
  0 siblings, 2 replies; 9+ messages in thread
From: John Talbut @ 2006-02-19 19:46 UTC (permalink / raw)
  To: Lee Revell; +Cc: alsa-devel

Thanks, Lee

Lee Revell wrote:

> This is not how ALSA works, you can't just cat things to the device
> file.  The interface to ALSA is through alsa-lib.

Can you or anyone explain this, or point to an explanation?
> 
> What happens if you start SIMPLE:
> 
> aplay file.wav

# aplay /dos/Workspace/Music/originaldedodedo.wav
ALSA lib pcm.c:2099:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:544: audio open error: No such file or directory


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Setup when compiled in 2.6 kernel
  2006-02-19 19:46   ` John Talbut
@ 2006-02-19 19:53     ` Lee Revell
  2006-02-19 21:47       ` John Talbut
  2006-02-20  8:21     ` Clemens Ladisch
  1 sibling, 1 reply; 9+ messages in thread
From: Lee Revell @ 2006-02-19 19:53 UTC (permalink / raw)
  To: John Talbut; +Cc: alsa-devel

On Sun, 2006-02-19 at 19:46 +0000, John Talbut wrote:
> Thanks, Lee
> 
> Lee Revell wrote:
> 
> > This is not how ALSA works, you can't just cat things to the device
> > file.  The interface to ALSA is through alsa-lib.
> 
> Can you or anyone explain this, or point to an explanation?

What's to explain?  Userspace apps don't access the device files
directly.  They should use the alsa-lib API.  Here is the documentation:

http://www.alsa-project.org/alsa-doc/alsa-lib/

> > 
> > What happens if you start SIMPLE:
> > 
> > aplay file.wav
> 
> # aplay /dos/Workspace/Music/originaldedodedo.wav
> ALSA lib pcm.c:2099:(snd_pcm_open_noupdate) Unknown PCM default
> aplay: main:544: audio open error: No such file or directory
> 


Because it defaults to device 0 which is usually a real soundcard, but
not on your system:

/proc/asound/cards:

0 [Dummy          ]: Dummy - Dummy
                      Dummy 1
1 [VirMIDI        ]: VirMIDI - VirMIDI
                      Virtual MIDI Card 1
2 [AudioPCI       ]: ENS1371 - Ensoniq AudioPCI
                      Ensoniq AudioPCI ENS1371 at 0xdf00, irq 10

Try unloading the snd-dummy and snd-virmidi modules, or don't enable
them when compiling the kernel.

Did you try this first with your distro's default kernel before building
your own?

Lee



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Setup when compiled in 2.6 kernel
  2006-02-19 19:53     ` Lee Revell
@ 2006-02-19 21:47       ` John Talbut
  2006-02-19 21:52         ` Lee Revell
  0 siblings, 1 reply; 9+ messages in thread
From: John Talbut @ 2006-02-19 21:47 UTC (permalink / raw)
  To: Lee Revell; +Cc: alsa-devel

Lee Revell wrote:

>>
>>>This is not how ALSA works, you can't just cat things to the device
>>>file.  The interface to ALSA is through alsa-lib.
>>
>>Can you or anyone explain this, or point to an explanation?
> 
> 
> What's to explain?

Well, some other devices can be checked to see if they are working by 
cat-ing to them.  It seems as if these are different.

>  Userspace apps don't access the device files
> directly.  They should use the alsa-lib API.  Here is the documentation:
> 
> http://www.alsa-project.org/alsa-doc/alsa-lib/

Thanks for that, I guess the answer is there, I will study it more when 
I get a moment.
> 
>>>What happens if you start SIMPLE:
>>>
>>>aplay file.wav
>>
>># aplay /dos/Workspace/Music/originaldedodedo.wav
>>ALSA lib pcm.c:2099:(snd_pcm_open_noupdate) Unknown PCM default
>>aplay: main:544: audio open error: No such file or directory
>>
> 
> 
> 
> Because it defaults to device 0 which is usually a real soundcard, but
> not on your system:
> 
> /proc/asound/cards:
> 
> 0 [Dummy          ]: Dummy - Dummy
>                       Dummy 1
> 1 [VirMIDI        ]: VirMIDI - VirMIDI
>                       Virtual MIDI Card 1
> 2 [AudioPCI       ]: ENS1371 - Ensoniq AudioPCI
>                       Ensoniq AudioPCI ENS1371 at 0xdf00, irq 10
> 
> Try unloading the snd-dummy and snd-virmidi modules, or don't enable
> them when compiling the kernel.

Is there any way of testing whether this is the/a problem before I 
recompile the kernel?  I will have to upgrade it when I recompile (2.6.8 
does not compile with gcc-4.0, which is what I have now.)
> 
> Did you try this first with your distro's default kernel before building your own?

No, I have been using custom compiled kernels for a long time.

John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Setup when compiled in 2.6 kernel
  2006-02-19 21:47       ` John Talbut
@ 2006-02-19 21:52         ` Lee Revell
  2006-02-20  7:13           ` John Talbut
  0 siblings, 1 reply; 9+ messages in thread
From: Lee Revell @ 2006-02-19 21:52 UTC (permalink / raw)
  To: John Talbut; +Cc: alsa-devel

On Sun, 2006-02-19 at 21:47 +0000, John Talbut wrote:
> Is there any way of testing whether this is the/a problem before I 
> recompile the kernel?  I will have to upgrade it when I recompile
> (2.6.8 
> does not compile with gcc-4.0, which is what I have now.) 

aplay -D default:2 file.wav should work.

If you won't use modules for whatever reason, you have to pass kernel
command line parameters to get your real soundcard to be device 0.

Easiest way is just use modules and load snd-ens1371 first

Lee



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Setup when compiled in 2.6 kernel
  2006-02-19 21:52         ` Lee Revell
@ 2006-02-20  7:13           ` John Talbut
  2006-02-20  8:01             ` Lee Revell
  0 siblings, 1 reply; 9+ messages in thread
From: John Talbut @ 2006-02-20  7:13 UTC (permalink / raw)
  To: Lee Revell; +Cc: alsa-devel

Lee Revell wrote:
> aplay -D default:2 file.wav should work.
> 
# aplay -D default:2 /dos/Workspace/Music/originaldedodedo.wav
ALSA lib pcm.c:2099:(snd_pcm_open_noupdate) Unknown PCM default:2
aplay: main:544: audio open error: No such file or directory

also

# aplay -L
  aplay: conf.c:3109: snd_config_update_free: Assertion `update->count > 
0 && update->finfo' failed.
  Aborted

What next?

John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Setup when compiled in 2.6 kernel
  2006-02-20  7:13           ` John Talbut
@ 2006-02-20  8:01             ` Lee Revell
  0 siblings, 0 replies; 9+ messages in thread
From: Lee Revell @ 2006-02-20  8:01 UTC (permalink / raw)
  To: John Talbut; +Cc: alsa-devel

On Mon, 2006-02-20 at 07:13 +0000, John Talbut wrote:
> Lee Revell wrote:
> > aplay -D default:2 file.wav should work.
> > 
> # aplay -D default:2 /dos/Workspace/Music/originaldedodedo.wav
> ALSA lib pcm.c:2099:(snd_pcm_open_noupdate) Unknown PCM default:2
> aplay: main:544: audio open error: No such file or directory
> 
> also
> 
> # aplay -L
>   aplay: conf.c:3109: snd_config_update_free: Assertion `update->count > 
> 0 && update->finfo' failed.
>   Aborted
> 
> What next?

Try what I said in my previous mail - build ALSA as modules and load the
one for your sound card first.

Lee



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Setup when compiled in 2.6 kernel
  2006-02-19 19:46   ` John Talbut
  2006-02-19 19:53     ` Lee Revell
@ 2006-02-20  8:21     ` Clemens Ladisch
  1 sibling, 0 replies; 9+ messages in thread
From: Clemens Ladisch @ 2006-02-20  8:21 UTC (permalink / raw)
  To: John Talbut; +Cc: alsa-devel

John Talbut wrote:
> # aplay /dos/Workspace/Music/originaldedodedo.wav
> ALSA lib pcm.c:2099:(snd_pcm_open_noupdate) Unknown PCM default

It seems alsa-lib isn't installed correctly.

Please try to compile+install the latest alsa-lib and alsa-utils
packages.


HTH
Clemens


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-02-20  8:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-19 17:21 Setup when compiled in 2.6 kernel John Talbut
2006-02-19 19:00 ` Lee Revell
2006-02-19 19:46   ` John Talbut
2006-02-19 19:53     ` Lee Revell
2006-02-19 21:47       ` John Talbut
2006-02-19 21:52         ` Lee Revell
2006-02-20  7:13           ` John Talbut
2006-02-20  8:01             ` Lee Revell
2006-02-20  8:21     ` Clemens Ladisch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.