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 ---

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

2012-03-23 Thread Torsten Schenk
Hello again, a simple bash script that you can run with start-stop-daemon --start --background --exec /path/to/file will do the job. Just adjust the value "timeout_sec" (time in seconds after function timeout() will be called), "freq_sec" (time in seconds of the pause between two checks) and "su

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. Gr

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

Re: [Alsa-user] USB Sound Card with SPDIF and AC3/DTS pass through

2011-08-18 Thread Torsten Schenk
Hi Rob, >Otherwise, could anyone suggest any other USB sound cards which might be >suitable? > As it seems to me, the TerraTec DMX 6Fire USB is capable of handling AC3 and DTS passthrough. The card is not the cheapest out there but it has a lot of features. It also has both connector types,

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 di

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