linuxalsaopenwrtpulseaudiompd

any command to release devices using pulseaudio


i am totally new to pulse audio and alsa. the situation is this:

  1. i have mpd compiled for alsa. this is embedded system and pulse audio plugin for mpd is not available.
  2. when i DO NOT start pulse audio, mpd runs fine using alsa
  3. as soon as i start pulse audio [ which is needed by bluetooth audio unfortunately ] , mpd / alsa stops working .

seems like, somehow pulse audio is grabbing the device and not letting it go . even after i stop pulse audio daemon .

Trying to run mpd afterwards gives me:

root@FINGI_GCC:~# mpc play http://relay3.slayradio.org:8000/ [paused] #1/1 0:00/0:00 (0%) volume:100% repeat: off random: off single: off consume: off ERROR: problems opening audio device

So i was wondering how to reset pulse audio ? need to keep running pulse audio,mpd,alsa all on the same device..but not all at the same time.

Any suggestion on this?


Solution

  • Assuming this audio device in in /dev/snd/, you could try to see which process is holding it with:

    lsof /dev/snd/*
    

    Then you could try to kill this process.

    For instance when I'm running alsamixer, I get:

    $ lsof /dev/snd/*
    COMMAND    PID    USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
    ...
    alsamixer 7152 emilien    3u   CHR  116,5      0t0 10154 /dev/snd/controlC0
    ...