Re: how to detect activity or non activity on soundcard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <rupat@xxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux