Re: [Alsa-user] No sound, no /proc/asound/

2011-02-11 Thread Torsten Schenk
I also use ubuntu (10.04) and it came to happen that the system didn't load the 
modules automatically any more. I don't know why that happened or where this 
loading is prohibited. Just try to load the module manually and see if that 
works. If so, you could also post this on a ubuntu mailing list.

  $ sudo modprobe [module]

You need to replace [module] with the module that fits your card, eventually 
snd-hda-intel or snd-usb-audio, these are very common cards.

Greets, Torsten

 On Fri, 11 Feb 2011 20:54:49 +0100 Marcin Szyniszewski  wrote  

 Did you issue alsamixer as the command or the full pathname? If the former, 
 maybe something is wrong with your path/environment setup. 
I used it as both. Nothing works :/ 
 
 I am wondering if your OS install hasn't actually loaded the modules 
 correctly for your hardware. 
Everything worked before. I tried to make my mic work and sound 
stopped to work. Now nothing works :P 
 
 Try the command 'lsmod' to list the modules that are loaded. If the list is 
 too long use 'lsmod | grep snd' to just list the ones that have 'snd' in 
 their names. 
$ lsmod | grep snd 
snd_page_alloc 7120 0 
 
But I don't know what that means :P 
 
 You can then use modinfo  to check details of each module. 
 Or modprobe (with care!) to alter what is loaded. 
Ok, and what modules should I check? 
 
 Do you have another sound system like Pulse active? if so, that may be 
 interfering with the direct use of ALSA. 
Stopping pulse and reinstalling ALSA didn't work. :( 
 
 You might also consider trying to install the latest version of ALSA in 
 case what you have isn't suitable for your hardware or is furtled in some 
 way. 
I think I have the latest version. 
 
 Sorry I can't be more help. But I hope the above may be useful. 
Thanks for help :) 
 
 Most times when I get something like that it has to do with the 
 /dev/'s not being present. Could be that udev isn't running on your 
 box. Or isn't configured for alsa. It could also be something else 
 like snd-pcm-oss not auto loading. And it's friends, snd-mixer-oss 
 snd-seq-oss. Basically cannot open means some sort of missing 
 something or bad permissions. Is the user in the audio group? Do the 
 /dev/audio* and /dev/dsp* stuff exist? In the old days we'd run 
 ./snddevices from the alsa-driver source tree. But that's probably 
 not the solution of choice these days. 
 
/dev/audio* doesn't exist, as well as /dev/dsp* 
Should I do something about that?? 
 
 # /etc/init.d/alsa-utils restart 
bash: /etc/init.d/alsa-utils: No such file or directory 
 
 # /etc/init.d/udev restart 
Rather than invoking init scripts through /etc/init.d, use the service(8) 
utility, e.g. service udev restart 
Since the script you are attempting to invoke has been converted to an 
Upstart job, you may also use the restart(8) utility, e.g. restart udev 
restart: Rejected send message, 1 matched rules; type=method_call, 
sender=:1.45 (uid=1000 pid=9806 comm=restart) 
interface=com.ubuntu.Upstart0_6.Job member=Restart error 
name=(unset) requested_reply=0 destination=com.ubuntu.Upstart 
(uid=0 pid=1 comm=/sbin/init)) 
 
 # groups  
mszynisz : mszynisz adm dialout fax cdrom floppy tape audio dip video 
plugdev fuse netdev lpadmin admin sambashare 
 
 # grep -i audio /etc/group 
audio:x:29:pulse,mszynisz 
 
 lsmod, dmesg, and all of the other stuff that's probably covered by 
 that alsa-info.sh script thing. 
My output of alsa-info.sh script is attached. 
 
Please help, I really need my sound :( 
 
Best, 
mszynisz 
-- 
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: 
Pinpoint memory and threading errors before they happen. 
Find and fix more than 250 security defects in the development cycle. 
Locate bottlenecks in serial and parallel code that limit performance. 
http://p.sf.net/sfu/intel-dev2devfeb___
 
Alsa-user mailing list 
Alsa-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/alsa-user 
 




--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] No sound, no /proc/asound/

2011-02-12 Thread Torsten Schenk
Like my previous speaker already told: the modules cannot be loaded because 
other modules are missing. Either you don't have modules installed at all 
(which most certainly means you have a wrong kernel image running) or the 
module loader cannot resolve the dependencies. To check if the module directory 
exists type
  $ ls /lib/modules/$(uname -r)
and check if a directory listing is displayed or an error indicating directory 
not found.

If it exists, try
  $ sudo depmod -a
before modprobe to make the module loader know the missing modules that have to 
be loaded automatically.


 On Sat, 12 Feb 2011 17:26:13 +0100 James Shatto  wrote  

As I suspected, the modules aren't loaded so alsa isn't even running. 
Hence your original open error(s). 
 
How did you install alsa? Not that I think it is your issue, but it 
could be. If you boot with lilo, you need to re-install lilo after 
creating a new kernel. Even if it's technically the same version of 
your old kernel. Although most distros default to grub these days. 
So not likely. 
 
If you compiled from source at least for some modules, you'll need to 
reboot to use the new kernel and the new modules. Not really 
applicable to sound as you probably didn't change any PCIe or other 
internals to gain the functionality. 
 
In the old days if you compiled from source you could insmod 
(modprobe) the modules in alsa-driver-???/modules/ until you got the 
right order and all of the modules loaded. This is representative of 
the errors that you're seeing. You can't load a certain module 
because another module wasn't loaded before it. That has those 
symbols (functions) that it needs. Which brings things full circle to 
alsa isn't properly installed. 
 
$ sudo dpkg -l '*alsa*' 
 
Only pay attention to the ones that start alsa or alsa-. On my debian 
setup (similar to ubuntu) I have alsa, alsa-base, 
alsa-firmware-loaders, alsa-headers, alsa-source, alsa-tools, 
alsa-tools-gui, and alsa-utils. On my system all of those are 
installed, except alsa-firmware-loaders, alsa-headers (needed to 
compile other things from source against it), and alsa-tools-gui. IMO 
you are probably missing alsa-base. This should have entries in 
/etc/modprobe.d/alsa* for autoloading your modules (without concerning 
yourself about the order of insertion). It could also be that you 
haven't run depmod -a, or your distro didn't. Which updates a sort of 
list of what modules are related so they can also load when the other 
is loaded. IME, alsa is independent of this list and relies on other 
things (/etc/modprobe.d/). 
 
If you haven't solved your issue by now, I guess you're stuck with the 
old school ways. Meaning you'll likely have to create a 
/etc/modprobe.d/ entry for alsa so it can auto load at boot. Which 
might look something like: 
 
#--- START - /etc/modprobe.d/alsa_custom.conf ---# 
 
alias char-major-116 snd 
alias char-major-14 soundcore 
 
options snd major=116 cards_limit=3 
 
# duplicate this following sequence for each soundcard you have 
# and bump (or omit) the index=# depending on the order / priority 
# that you desire. And adjust the first # in the sound- aliases to 
# match the index number. 
 
# your specific module NEXT LINE (and the next one) 
options snd-hda-intel index=0 
alias snd-card-0 snd-hda-intel 
 
# this one assumes OSS emulation, you might need to 
# reference alsa-project.org to find a different one if you 
# opted out on that option. --with-oss=yes ? 
# (been a while) 
alias sound-slot-0 snd-card-0 
alias sound-service-0-0 snd-mixer-oss 
alias sound-service-0-1 snd-seq-oss 
alias sound-service-0-3 snd-pcm-oss 
alias sound-service-0-8 snd-seq-oss 
alias sound-service-0-12 snd-pcm-oss 
 
#--- END ---# 
 
And 20 years after linux started, we're still configuring sound from 
the command line. Be sure to reboot OR try to use the soundcard to 
get the modules to auto magically load. They generally load at boot 
because your distro will likely try to restore mixer settings. And 
therefor try to use your soundcard. (which is or was failing for you) 
 
- James 
 
 
On 2/12/11, Marcin Szyniszewski  wrote: 
 Thank you all for the replies! Very appreciated! :) 
 
 $ sudo modprobe [module] 
 FATAL: Error inserting snd 
 (/lib/modules/2.6.35-25-generic/kernel/sound/acore/snd.ko): Unknown 
 symbol in module, or unknown parameter (see dmesg) 
 WARNING: Error running install command for snd 
 WARNING: Error inserting snd_pcm 
 (/lib/modules/2.6.35-25-generic/kernel/sound/acore/snd-pcm.ko): 
 Unknown symbol in module, or unknown parameter (see dmesg) 
 WARNING: Error inserting snd_hwdep 
 (/lib/modules/2.6.35-25-generic/kernel/sound/acore/snd-hwdep.ko): 
 Unknown symbol in module, or unknown parameter (see dmesg) 
 WARNING: Error inserting snd_hda_codec 
 (/lib/modules/2.6.35-25-generic/kernel/sound/pci/hda/snd-hda-codec.ko): 
 Unknown symbol in module, or unknown parameter (see dmesg) 
 FATAL: Error inserting snd_hda_intel 
 

Re: [Alsa-user] Way to monitor sample rate? Alsaequal.

2011-11-05 Thread Torsten Schenk
  Is there any way of finding the sample rate being output from alsa? 
Yes, you can use
cat /proc/asound/card0/pcm0p/sub0/hw_params

to display you current card mode. If you have multiple cards/subdevices per
card/... just browse around in /proc/asound. To find out which pcm
substream is found in a directory, enter:
cat /proc/asound/card0/pcm0p/sub0/info

or
cat /proc/asound/card0/pcm0p/info

Greets,
Torsten


--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] how to detect activity or non activity on soundcard

2012-03-23 Thread Torsten Schenk
Hello Robert,

take a look into the /proc/asound folder, there you find alsa status
informations. For example if I do a 'cat' on my PC on the file

/proc/asound/card0/pcm0p/sub0/hw_params

it returns closed if no sound is running and information about
samplerate and so on if sound is running.

Greets,
Torsten

On Fri, 23 Mar 2012 09:07:02 +0100
Robert Bude ru...@rupat.de wrote:

 
 
 hi everybody, 
 
 at home i have a mythbuntu media pc. it will shutdown
 if no tv recording is sheduled and no user programs like mediaplayers
 webbrowsers and so on open. this works with an preshutdown script
 which simply checks if one of the programs i define is still active.
 this works very good. the only problem is that sometimes i forgott to
 close vlc player or some other programs.  
 
 so i have a new good idea to safe
 power consumption ;) my new plan is to monitor if the pc outputs
 sound. if this pc gives no music or tv sound it is on for nothing !
 the best way i think is to monitor the output of soundcard or device
 if there is activity at the last 15 minutes. if not shutdown. 
 
 But how i can detect
 this ? 
 
 Any hints or new directions are very welcome 
 
 ps: i had a idea
 to detect when als is going in power safe mode, but this only works if
 outputs set to mute. so this is no alternative. 
 
 Greetings from Robert
 from Cottbus, Germany ! 
 
  


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Playing audio with ALSA api(newbie)

2012-04-11 Thread Torsten Schenk
Hello Fabio,

 snd_pcm_writei (playback_handle, p, 131072)
writes 131072 FRAMES

 p += 131072
increases the pointer by 131072 SAMPLES.

If you write
p += 131072 * number_of_channels
instead, your program should do the job.

Greets,
Torsten


--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user