4 ms·
I wonder if there is a way to monitor whether the mic is being accessed from a program on linux?
by metaobject 11y ago
I wonder if there is a way to monitor whether the mic is being accessed from a program on linux?
- cnvogel 11y agoI've run a "arecord" on hw:1,0 (via pulseaudio, oh my....) to show that one of the devices (pcm0c) is currently capturing audio. Below is the "hardware status" as reported by alsa. On the pavucontrol UI application (again pulseaudio) the recording application is also shown. ➜ ~ find /proc/asound/card* -name status | xargs grep "" /proc/asound/card0/pcm0c/sub0/status:closed /proc/asound/card0/pcm0p/sub0/status:closed /proc/asound/card0/pcm2c/sub0/status:closed /proc/asound/card0/pcm3p/sub0/status:closed /proc/asound/card0/pcm7p/sub0/status:closed /proc/asound/card0/pcm8p/sub0/status:closed #### ---v--- this one records /proc/asound/card1/pcm0c/sub0/status:state: RUNNING /proc/asound/card1/pcm0c/sub0/status:owner_pid : 1260 /proc/asound/card1/pcm0c/sub0/status:trigger_time: 108525.846389845 /proc/asound/card1/pcm0c/sub0/status:tstamp : 108558.575144693 /proc/asound/card1/pcm0c/sub0/status:delay : 96 /proc/asound/card1/pcm0c/sub0/status:avail : 96 /proc/asound/card1/pcm0c/sub0/status:avail_max : 96 /proc/asound/card1/pcm0c/sub0/status:----- /proc/asound/card1/pcm0c/sub0/status:hw_ptr : 1570901 /proc/asound/card1/pcm0c/sub0/status:appl_ptr : 1570805 #### ---^--- /proc/asound/card1/pcm0p/sub0/status:closed The nomenclature here is hw:N,M corresponds to cardN/pcmMc (c: capture, p: playback).