[Csnd] Soundcard Left Busy After Killall Csound

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] Soundcard Left Busy After Killall Csound

epalaima
Hi, I am working on a project using Csound on the Raspberry Pi. I control the running of csd files via ssh. I often use the command 'killall csound', as an easy way to stop all the csound processes I have running. However, after running this command, the next time I run a csd I get the following error:

 *** Cannot open device 'hw:0,0' for audio input: Device or resource busy

It seems that using killall Csound is confusing the soundcard somehow. After I reboot the Pi everything works again. I am using the AudioInjector (http://www.audioinjector.net/). 

Is there an alternative way of quitting Csound via command line, or a command I could use to reset the soundcard?

Thanks,

Emmett

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Soundcard Left Busy After Killall Csound

gsenna
Is Csound effectively killed after the killall? Alsa or Jack?


On 15/02/17 16:44, Emmett Palaima wrote:

> Hi, I am working on a project using Csound on the Raspberry Pi. I control
> the running of csd files via ssh. I often use the command 'killall csound',
> as an easy way to stop all the csound processes I have running. However,
> after running this command, the next time I run a csd I get the following
> error:
>
>  *** Cannot open device 'hw:0,0' for audio input: Device or resource busy
>
> It seems that using killall Csound is confusing the soundcard somehow.
> After I reboot the Pi everything works again. I am using the AudioInjector (
> http://www.audioinjector.net/).
>
> Is there an alternative way of quitting Csound via command line, or a
> command I could use to reset the soundcard?
>
> Thanks,
>
> Emmett
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Soundcard Left Busy After Killall Csound

epalaima
I am using Alsa. 

After running killall, fuser -fv /dev/snd/* returns: 

                     USER        PID ACCESS COMMAND

/dev/snd/controlC0:  pi          747 F.... lxpanel

/dev/snd/pcmC0D0c:   pi         1032 F.... csound

/dev/snd/pcmC0D0p:   pi         1032 F.... csound


So perhaps Csound is not being properly exited. Any idea what might be causing this?

Here is also the simple csd I am using for testing, just to be thorough:

<CsoundSynthesizer>

<CsOptions>

-odac:hw:0,0

-iadc:hw:0,0

-+rtaudio=alsa

</CsOptions>

<CsInstruments>


sr = 48000

ksmps = 128

nchnls = 2

0dbfs = 1.0


turnon "helloWorld"


instr helloWorld

ares lfo 1, 440, 2

outs ares, ares

endin


</CsInstruments>

<CsScore>

</CsScore>

</CsoundSynthesizer>


On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna <[hidden email]> wrote:
Is Csound effectively killed after the killall? Alsa or Jack?


On 15/02/17 16:44, Emmett Palaima wrote:
> Hi, I am working on a project using Csound on the Raspberry Pi. I control
> the running of csd files via ssh. I often use the command 'killall csound',
> as an easy way to stop all the csound processes I have running. However,
> after running this command, the next time I run a csd I get the following
> error:
>
>  *** Cannot open device 'hw:0,0' for audio input: Device or resource busy
>
> It seems that using killall Csound is confusing the soundcard somehow.
> After I reboot the Pi everything works again. I am using the AudioInjector (
> http://www.audioinjector.net/).
>
> Is there an alternative way of quitting Csound via command line, or a
> command I could use to reset the soundcard?
>
> Thanks,
>
> Emmett
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Soundcard Left Busy After Killall Csound

gsenna
So after the killall what does 'ps aux | grep csound' returns? If it
still there then it might be a Csound bug, kill it with 'killall -9 csound'



On 15/02/17 17:07, Emmett Palaima wrote:

> I am using Alsa.
>
> After running killall, fuser -fv /dev/snd/* returns:
>
>                      USER        PID ACCESS COMMAND
>
> /dev/snd/controlC0:  pi          747 F.... lxpanel
>
> /dev/snd/pcmC0D0c:   pi         1032 F.... csound
>
> /dev/snd/pcmC0D0p:   pi         1032 F.... csound
>
>
> So perhaps Csound is not being properly exited. Any idea what might be
> causing this?
>
> Here is also the simple csd I am using for testing, just to be thorough:
>
> <CsoundSynthesizer>
>
> <CsOptions>
>
> -odac:hw:0,0
>
> -iadc:hw:0,0
>
> -+rtaudio=alsa
>
> </CsOptions>
>
> <CsInstruments>
>
>
> sr = 48000
>
> ksmps = 128
>
> nchnls = 2
>
> 0dbfs = 1.0
>
>
> turnon "helloWorld"
>
>
> instr helloWorld
>
> ares lfo 1, 440, 2
>
> outs ares, ares
>
> endin
>
>
> </CsInstruments>
>
> <CsScore>
>
> </CsScore>
>
> </CsoundSynthesizer>
>
> On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna <[hidden email]> wrote:
>
>> Is Csound effectively killed after the killall? Alsa or Jack?
>>
>>
>> On 15/02/17 16:44, Emmett Palaima wrote:
>>> Hi, I am working on a project using Csound on the Raspberry Pi. I control
>>> the running of csd files via ssh. I often use the command 'killall
>> csound',
>>> as an easy way to stop all the csound processes I have running. However,
>>> after running this command, the next time I run a csd I get the following
>>> error:
>>>
>>>  *** Cannot open device 'hw:0,0' for audio input: Device or resource busy
>>>
>>> It seems that using killall Csound is confusing the soundcard somehow.
>>> After I reboot the Pi everything works again. I am using the
>> AudioInjector (
>>> http://www.audioinjector.net/).
>>>
>>> Is there an alternative way of quitting Csound via command line, or a
>>> command I could use to reset the soundcard?
>>>
>>> Thanks,
>>>
>>> Emmett
>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Soundcard Left Busy After Killall Csound

epalaima
ps aux | grep csound returns: 

pi        1037 81.4  1.3  28500 12404 ?        Rs   20:19   0:56 csound test.csd
pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep --color=auto csound

After I do killall 9 it returns 
pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep --color=auto csound

I think that might have been what I was looking for, but what is the second Csound process?

On Wed, Feb 15, 2017 at 3:12 PM, Guillermo Senna <[hidden email]> wrote:
So after the killall what does 'ps aux | grep csound' returns? If it
still there then it might be a Csound bug, kill it with 'killall -9 csound'



On 15/02/17 17:07, Emmett Palaima wrote:
> I am using Alsa.
>
> After running killall, fuser -fv /dev/snd/* returns:
>
>                      USER        PID ACCESS COMMAND
>
> /dev/snd/controlC0:  pi          747 F.... lxpanel
>
> /dev/snd/pcmC0D0c:   pi         1032 F.... csound
>
> /dev/snd/pcmC0D0p:   pi         1032 F.... csound
>
>
> So perhaps Csound is not being properly exited. Any idea what might be
> causing this?
>
> Here is also the simple csd I am using for testing, just to be thorough:
>
> <CsoundSynthesizer>
>
> <CsOptions>
>
> -odac:hw:0,0
>
> -iadc:hw:0,0
>
> -+rtaudio=alsa
>
> </CsOptions>
>
> <CsInstruments>
>
>
> sr = 48000
>
> ksmps = 128
>
> nchnls = 2
>
> 0dbfs = 1.0
>
>
> turnon "helloWorld"
>
>
> instr helloWorld
>
> ares lfo 1, 440, 2
>
> outs ares, ares
>
> endin
>
>
> </CsInstruments>
>
> <CsScore>
>
> </CsScore>
>
> </CsoundSynthesizer>
>
> On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna <[hidden email]> wrote:
>
>> Is Csound effectively killed after the killall? Alsa or Jack?
>>
>>
>> On 15/02/17 16:44, Emmett Palaima wrote:
>>> Hi, I am working on a project using Csound on the Raspberry Pi. I control
>>> the running of csd files via ssh. I often use the command 'killall
>> csound',
>>> as an easy way to stop all the csound processes I have running. However,
>>> after running this command, the next time I run a csd I get the following
>>> error:
>>>
>>>  *** Cannot open device 'hw:0,0' for audio input: Device or resource busy
>>>
>>> It seems that using killall Csound is confusing the soundcard somehow.
>>> After I reboot the Pi everything works again. I am using the
>> AudioInjector (
>>> http://www.audioinjector.net/).
>>>
>>> Is there an alternative way of quitting Csound via command line, or a
>>> command I could use to reset the soundcard?
>>>
>>> Thanks,
>>>
>>> Emmett
>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Soundcard Left Busy After Killall Csound

epalaima
Yes, now that I replaced killall with killall -9 the problem is solved!

On Wed, Feb 15, 2017 at 3:22 PM, Emmett Palaima <[hidden email]> wrote:
ps aux | grep csound returns: 

pi        1037 81.4  1.3  28500 12404 ?        Rs   20:19   0:56 csound test.csd
pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep --color=auto csound

After I do killall 9 it returns 
pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep --color=auto csound

I think that might have been what I was looking for, but what is the second Csound process?

On Wed, Feb 15, 2017 at 3:12 PM, Guillermo Senna <[hidden email]> wrote:
So after the killall what does 'ps aux | grep csound' returns? If it
still there then it might be a Csound bug, kill it with 'killall -9 csound'



On 15/02/17 17:07, Emmett Palaima wrote:
> I am using Alsa.
>
> After running killall, fuser -fv /dev/snd/* returns:
>
>                      USER        PID ACCESS COMMAND
>
> /dev/snd/controlC0:  pi          747 F.... lxpanel
>
> /dev/snd/pcmC0D0c:   pi         1032 F.... csound
>
> /dev/snd/pcmC0D0p:   pi         1032 F.... csound
>
>
> So perhaps Csound is not being properly exited. Any idea what might be
> causing this?
>
> Here is also the simple csd I am using for testing, just to be thorough:
>
> <CsoundSynthesizer>
>
> <CsOptions>
>
> -odac:hw:0,0
>
> -iadc:hw:0,0
>
> -+rtaudio=alsa
>
> </CsOptions>
>
> <CsInstruments>
>
>
> sr = 48000
>
> ksmps = 128
>
> nchnls = 2
>
> 0dbfs = 1.0
>
>
> turnon "helloWorld"
>
>
> instr helloWorld
>
> ares lfo 1, 440, 2
>
> outs ares, ares
>
> endin
>
>
> </CsInstruments>
>
> <CsScore>
>
> </CsScore>
>
> </CsoundSynthesizer>
>
> On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna <[hidden email]> wrote:
>
>> Is Csound effectively killed after the killall? Alsa or Jack?
>>
>>
>> On 15/02/17 16:44, Emmett Palaima wrote:
>>> Hi, I am working on a project using Csound on the Raspberry Pi. I control
>>> the running of csd files via ssh. I often use the command 'killall
>> csound',
>>> as an easy way to stop all the csound processes I have running. However,
>>> after running this command, the next time I run a csd I get the following
>>> error:
>>>
>>>  *** Cannot open device 'hw:0,0' for audio input: Device or resource busy
>>>
>>> It seems that using killall Csound is confusing the soundcard somehow.
>>> After I reboot the Pi everything works again. I am using the
>> AudioInjector (
>>> http://www.audioinjector.net/).
>>>
>>> Is there an alternative way of quitting Csound via command line, or a
>>> command I could use to reset the soundcard?
>>>
>>> Thanks,
>>>
>>> Emmett
>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Soundcard Left Busy After Killall Csound

gsenna
In reply to this post by epalaima

By second process you mean this ?

pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep --color=auto csound
That is just the grep command you passed in "ps aux | grep csound".
What actually happened is that your first "killall csound" command was not effective because Csound is ignoring the signal or could not unblock. I've no idea what it was as your csd seems simple enough.


On 15/02/17 17:22, Emmett Palaima wrote:
ps aux | grep csound returns:

pi        1037 81.4  1.3  28500 12404 ?        Rs   20:19   0:56 csound
test.csd
pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep
--color=auto csound


After I do killall 9 it returns

pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep
--color=auto csound


I think that might have been what I was looking for, but what is the second
Csound process?

On Wed, Feb 15, 2017 at 3:12 PM, Guillermo Senna [hidden email] wrote:

So after the killall what does 'ps aux | grep csound' returns? If it
still there then it might be a Csound bug, kill it with 'killall -9 csound'



On 15/02/17 17:07, Emmett Palaima wrote:
I am using Alsa.

After running killall, fuser -fv /dev/snd/* returns:

                     USER        PID ACCESS COMMAND

/dev/snd/controlC0:  pi          747 F.... lxpanel

/dev/snd/pcmC0D0c:   pi         1032 F.... csound

/dev/snd/pcmC0D0p:   pi         1032 F.... csound


So perhaps Csound is not being properly exited. Any idea what might be
causing this?

Here is also the simple csd I am using for testing, just to be thorough:

<CsoundSynthesizer>

<CsOptions>

-odac:hw:0,0

-iadc:hw:0,0

-+rtaudio=alsa

</CsOptions>

<CsInstruments>


sr = 48000

ksmps = 128

nchnls = 2

0dbfs = 1.0


turnon "helloWorld"


instr helloWorld

ares lfo 1, 440, 2

outs ares, ares

endin


</CsInstruments>

<CsScore>

</CsScore>

</CsoundSynthesizer>

On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna [hidden email]
wrote:

          
Is Csound effectively killed after the killall? Alsa or Jack?


On 15/02/17 16:44, Emmett Palaima wrote:
Hi, I am working on a project using Csound on the Raspberry Pi. I
control
the running of csd files via ssh. I often use the command 'killall
csound',
as an easy way to stop all the csound processes I have running.
However,
after running this command, the next time I run a csd I get the
following
error:

 *** Cannot open device 'hw:0,0' for audio input: Device or resource
busy
It seems that using killall Csound is confusing the soundcard somehow.
After I reboot the Pi everything works again. I am using the
AudioInjector (
http://www.audioinjector.net/).

Is there an alternative way of quitting Csound via command line, or a
command I could use to reset the soundcard?

Thanks,

Emmett

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Soundcard Left Busy After Killall Csound

epalaima
I think it is probably something to do with how I am communicating with the Pi via ssh. I send each ssh command individually, as in:

pi@<IP> 'my command'

killall -9 definitely does the trick though. What does the -9 do? I can't seem to find that in the killall docs for command line flags.

On Wed, Feb 15, 2017 at 3:36 PM, Guillermo Senna <[hidden email]> wrote:

By second process you mean this ?

pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep --color=auto csound
That is just the grep command you passed in "ps aux | grep csound".
What actually happened is that your first "killall csound" command was not effective because Csound is ignoring the signal or could not unblock. I've no idea what it was as your csd seems simple enough.



On 15/02/17 17:22, Emmett Palaima wrote:
ps aux | grep csound returns:

pi        1037 81.4  1.3  28500 12404 ?        Rs   20:19   0:56 csound
test.csd
pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep
--color=auto csound


After I do killall 9 it returns

pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep
--color=auto csound


I think that might have been what I was looking for, but what is the second
Csound process?

On Wed, Feb 15, 2017 at 3:12 PM, Guillermo Senna [hidden email] wrote:

So after the killall what does 'ps aux | grep csound' returns? If it
still there then it might be a Csound bug, kill it with 'killall -9 csound'



On 15/02/17 17:07, Emmett Palaima wrote:
I am using Alsa.

After running killall, fuser -fv /dev/snd/* returns:

                     USER        PID ACCESS COMMAND

/dev/snd/controlC0:  pi          747 F.... lxpanel

/dev/snd/pcmC0D0c:   pi         1032 F.... csound

/dev/snd/pcmC0D0p:   pi         1032 F.... csound


So perhaps Csound is not being properly exited. Any idea what might be
causing this?

Here is also the simple csd I am using for testing, just to be thorough:

<CsoundSynthesizer>

<CsOptions>

-odac:hw:0,0

-iadc:hw:0,0

-+rtaudio=alsa

</CsOptions>

<CsInstruments>


sr = 48000

ksmps = 128

nchnls = 2

0dbfs = 1.0


turnon "helloWorld"


instr helloWorld

ares lfo 1, 440, 2

outs ares, ares

endin


</CsInstruments>

<CsScore>

</CsScore>

</CsoundSynthesizer>

On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna [hidden email]
wrote:

          
Is Csound effectively killed after the killall? Alsa or Jack?


On 15/02/17 16:44, Emmett Palaima wrote:
Hi, I am working on a project using Csound on the Raspberry Pi. I
control
the running of csd files via ssh. I often use the command 'killall
csound',
as an easy way to stop all the csound processes I have running.
However,
after running this command, the next time I run a csd I get the
following
error:

 *** Cannot open device 'hw:0,0' for audio input: Device or resource
busy
It seems that using killall Csound is confusing the soundcard somehow.
After I reboot the Pi everything works again. I am using the
AudioInjector (
http://www.audioinjector.net/).

Is there an alternative way of quitting Csound via command line, or a
command I could use to reset the soundcard?

Thanks,

Emmett

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Soundcard Left Busy After Killall Csound

epalaima
* ssh pi@<IP> 'my command'

On Wed, Feb 15, 2017 at 3:45 PM, Emmett Palaima <[hidden email]> wrote:
I think it is probably something to do with how I am communicating with the Pi via ssh. I send each ssh command individually, as in:

pi@<IP> 'my command'

killall -9 definitely does the trick though. What does the -9 do? I can't seem to find that in the killall docs for command line flags.

On Wed, Feb 15, 2017 at 3:36 PM, Guillermo Senna <[hidden email]> wrote:

By second process you mean this ?

pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep --color=auto csound
That is just the grep command you passed in "ps aux | grep csound".
What actually happened is that your first "killall csound" command was not effective because Csound is ignoring the signal or could not unblock. I've no idea what it was as your csd seems simple enough.



On 15/02/17 17:22, Emmett Palaima wrote:
ps aux | grep csound returns:

pi        1037 81.4  1.3  28500 12404 ?        Rs   20:19   0:56 csound
test.csd
pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep
--color=auto csound


After I do killall 9 it returns

pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep
--color=auto csound


I think that might have been what I was looking for, but what is the second
Csound process?

On Wed, Feb 15, 2017 at 3:12 PM, Guillermo Senna [hidden email] wrote:

So after the killall what does 'ps aux | grep csound' returns? If it
still there then it might be a Csound bug, kill it with 'killall -9 csound'



On 15/02/17 17:07, Emmett Palaima wrote:
I am using Alsa.

After running killall, fuser -fv /dev/snd/* returns:

                     USER        PID ACCESS COMMAND

/dev/snd/controlC0:  pi          747 F.... lxpanel

/dev/snd/pcmC0D0c:   pi         1032 F.... csound

/dev/snd/pcmC0D0p:   pi         1032 F.... csound


So perhaps Csound is not being properly exited. Any idea what might be
causing this?

Here is also the simple csd I am using for testing, just to be thorough:

<CsoundSynthesizer>

<CsOptions>

-odac:hw:0,0

-iadc:hw:0,0

-+rtaudio=alsa

</CsOptions>

<CsInstruments>


sr = 48000

ksmps = 128

nchnls = 2

0dbfs = 1.0


turnon "helloWorld"


instr helloWorld

ares lfo 1, 440, 2

outs ares, ares

endin


</CsInstruments>

<CsScore>

</CsScore>

</CsoundSynthesizer>

On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna [hidden email]
wrote:

          
Is Csound effectively killed after the killall? Alsa or Jack?


On 15/02/17 16:44, Emmett Palaima wrote:
Hi, I am working on a project using Csound on the Raspberry Pi. I
control
the running of csd files via ssh. I often use the command 'killall
csound',
as an easy way to stop all the csound processes I have running.
However,
after running this command, the next time I run a csd I get the
following
error:

 *** Cannot open device 'hw:0,0' for audio input: Device or resource
busy
It seems that using killall Csound is confusing the soundcard somehow.
After I reboot the Pi everything works again. I am using the
AudioInjector (
http://www.audioinjector.net/).

Is there an alternative way of quitting Csound via command line, or a
command I could use to reset the soundcard?

Thanks,

Emmett

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Soundcard Left Busy After Killall Csound

gsenna
In reply to this post by epalaima
-9 is the same as passing SIGKILL.You can read a little about signals
here:
http://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html

But Csound should behave correctly if you run it like that. Unless it
needs to be attached to a tty. I really don't know why the killall
wasn't effective. Maybe it was your particular audio interface's alsa
module.


On 15/02/17 17:45, Emmett Palaima wrote:

> I think it is probably something to do with how I am communicating with the
> Pi via ssh. I send each ssh command individually, as in:
>
> pi@<IP> 'my command'
>
> killall -9 definitely does the trick though. What does the -9 do? I can't
> seem to find that in the killall docs for command line flags.
>
> On Wed, Feb 15, 2017 at 3:36 PM, Guillermo Senna <[hidden email]> wrote:
>
>> By second process you mean this ▽?
>>
>> pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep --color=auto csound
>>
>> That is just the grep command you passed in "ps aux | grep csound".
>> What actually happened is that your first "killall csound" command was not
>> effective because Csound is ignoring the signal or could not unblock. I've
>> no idea what it was as your csd seems simple enough.
>>
>>
>>
>> On 15/02/17 17:22, Emmett Palaima wrote:
>>
>> ps aux | grep csound returns:
>>
>> pi        1037 81.4  1.3  28500 12404 ?        Rs   20:19   0:56 csound
>> test.csd
>> pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep
>> --color=auto csound
>>
>>
>> After I do killall 9 it returns
>>
>> pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep
>> --color=auto csound
>>
>>
>> I think that might have been what I was looking for, but what is the second
>> Csound process?
>>
>> On Wed, Feb 15, 2017 at 3:12 PM, Guillermo Senna <[hidden email]> <[hidden email]> wrote:
>>
>>
>> So after the killall what does 'ps aux | grep csound' returns? If it
>> still there then it might be a Csound bug, kill it with 'killall -9 csound'
>>
>>
>>
>> On 15/02/17 17:07, Emmett Palaima wrote:
>>
>> I am using Alsa.
>>
>> After running killall, fuser -fv /dev/snd/* returns:
>>
>>                      USER        PID ACCESS COMMAND
>>
>> /dev/snd/controlC0:  pi          747 F.... lxpanel
>>
>> /dev/snd/pcmC0D0c:   pi         1032 F.... csound
>>
>> /dev/snd/pcmC0D0p:   pi         1032 F.... csound
>>
>>
>> So perhaps Csound is not being properly exited. Any idea what might be
>> causing this?
>>
>> Here is also the simple csd I am using for testing, just to be thorough:
>>
>> <CsoundSynthesizer>
>>
>> <CsOptions>
>>
>> -odac:hw:0,0
>>
>> -iadc:hw:0,0
>>
>> -+rtaudio=alsa
>>
>> </CsOptions>
>>
>> <CsInstruments>
>>
>>
>> sr = 48000
>>
>> ksmps = 128
>>
>> nchnls = 2
>>
>> 0dbfs = 1.0
>>
>>
>> turnon "helloWorld"
>>
>>
>> instr helloWorld
>>
>> ares lfo 1, 440, 2
>>
>> outs ares, ares
>>
>> endin
>>
>>
>> </CsInstruments>
>>
>> <CsScore>
>>
>> </CsScore>
>>
>> </CsoundSynthesizer>
>>
>> On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna <[hidden email]> <[hidden email]>
>>
>> wrote:
>>
>> Is Csound effectively killed after the killall? Alsa or Jack?
>>
>>
>> On 15/02/17 16:44, Emmett Palaima wrote:
>>
>> Hi, I am working on a project using Csound on the Raspberry Pi. I
>>
>> control
>>
>> the running of csd files via ssh. I often use the command 'killall
>>
>> csound',
>>
>> as an easy way to stop all the csound processes I have running.
>>
>> However,
>>
>> after running this command, the next time I run a csd I get the
>>
>> following
>>
>> error:
>>
>>  *** Cannot open device 'hw:0,0' for audio input: Device or resource
>>
>> busy
>>
>> It seems that using killall Csound is confusing the soundcard somehow.
>> After I reboot the Pi everything works again. I am using the
>>
>> AudioInjector (
>>
>> http://www.audioinjector.net/).
>>
>> Is there an alternative way of quitting Csound via command line, or a
>> command I could use to reset the soundcard?
>>
>> Thanks,
>>
>> Emmett
>>
>> Csound mailing [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>>
>> Csound mailing [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>>
>> Csound mailing [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>>
>> Csound mailing [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>>
>> Csound mailing [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>>
>>
>> Csound mailing list [hidden email] https://listserv.heanet.ie/
>> cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/
>> csound/issues Discussions of bugs and features can be posted here
>>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Soundcard Left Busy After Killall Csound

jpff
SIGINT is caugt andinterats wit exitnow
I suspet tat might be te probem; sigal andle in Top/csound,c

==J

On Wed, 15 Feb 2017, Guillermo Senna wrote:

> -9 is the same as passing SIGKILL.You can read a little about signals
> here:
> http://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html
>
> But Csound should behave correctly if you run it like that. Unless it
> needs to be attached to a tty. I really don't know why the killall
> wasn't effective. Maybe it was your particular audio interface's alsa
> module.
>
>
> On 15/02/17 17:45, Emmett Palaima wrote:
>> I think it is probably something to do with how I am communicating with the
>> Pi via ssh. I send each ssh command individually, as in:
>>
>> pi@<IP> 'my command'
>>
>> killall -9 definitely does the trick though. What does the -9 do? I can't
>> seem to find that in the killall docs for command line flags.
>>
>> On Wed, Feb 15, 2017 at 3:36 PM, Guillermo Senna <[hidden email]> wrote:
>>
>>> By second process you mean this ▽?
>>>
>>> pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep --color=auto csound
>>>
>>> That is just the grep command you passed in "ps aux | grep csound".
>>> What actually happened is that your first "killall csound" command was not
>>> effective because Csound is ignoring the signal or could not unblock. I've
>>> no idea what it was as your csd seems simple enough.
>>>
>>>
>>>
>>> On 15/02/17 17:22, Emmett Palaima wrote:
>>>
>>> ps aux | grep csound returns:
>>>
>>> pi        1037 81.4  1.3  28500 12404 ?        Rs   20:19   0:56 csound
>>> test.csd
>>> pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep
>>> --color=auto csound
>>>
>>>
>>> After I do killall 9 it returns
>>>
>>> pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep
>>> --color=auto csound
>>>
>>>
>>> I think that might have been what I was looking for, but what is the second
>>> Csound process?
>>>
>>> On Wed, Feb 15, 2017 at 3:12 PM, Guillermo Senna <[hidden email]> <[hidden email]> wrote:
>>>
>>>
>>> So after the killall what does 'ps aux | grep csound' returns? If it
>>> still there then it might be a Csound bug, kill it with 'killall -9 csound'
>>>
>>>
>>>
>>> On 15/02/17 17:07, Emmett Palaima wrote:
>>>
>>> I am using Alsa.
>>>
>>> After running killall, fuser -fv /dev/snd/* returns:
>>>
>>>                      USER        PID ACCESS COMMAND
>>>
>>> /dev/snd/controlC0:  pi          747 F.... lxpanel
>>>
>>> /dev/snd/pcmC0D0c:   pi         1032 F.... csound
>>>
>>> /dev/snd/pcmC0D0p:   pi         1032 F.... csound
>>>
>>>
>>> So perhaps Csound is not being properly exited. Any idea what might be
>>> causing this?
>>>
>>> Here is also the simple csd I am using for testing, just to be thorough:
>>>
>>> <CsoundSynthesizer>
>>>
>>> <CsOptions>
>>>
>>> -odac:hw:0,0
>>>
>>> -iadc:hw:0,0
>>>
>>> -+rtaudio=alsa
>>>
>>> </CsOptions>
>>>
>>> <CsInstruments>
>>>
>>>
>>> sr = 48000
>>>
>>> ksmps = 128
>>>
>>> nchnls = 2
>>>
>>> 0dbfs = 1.0
>>>
>>>
>>> turnon "helloWorld"
>>>
>>>
>>> instr helloWorld
>>>
>>> ares lfo 1, 440, 2
>>>
>>> outs ares, ares
>>>
>>> endin
>>>
>>>
>>> </CsInstruments>
>>>
>>> <CsScore>
>>>
>>> </CsScore>
>>>
>>> </CsoundSynthesizer>
>>>
>>> On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna <[hidden email]> <[hidden email]>
>>>
>>> wrote:
>>>
>>> Is Csound effectively killed after the killall? Alsa or Jack?
>>>
>>>
>>> On 15/02/17 16:44, Emmett Palaima wrote:
>>>
>>> Hi, I am working on a project using Csound on the Raspberry Pi. I
>>>
>>> control
>>>
>>> the running of csd files via ssh. I often use the command 'killall
>>>
>>> csound',
>>>
>>> as an easy way to stop all the csound processes I have running.
>>>
>>> However,
>>>
>>> after running this command, the next time I run a csd I get the
>>>
>>> following
>>>
>>> error:
>>>
>>>  *** Cannot open device 'hw:0,0' for audio input: Device or resource
>>>
>>> busy
>>>
>>> It seems that using killall Csound is confusing the soundcard somehow.
>>> After I reboot the Pi everything works again. I am using the
>>>
>>> AudioInjector (
>>>
>>> http://www.audioinjector.net/).
>>>
>>> Is there an alternative way of quitting Csound via command line, or a
>>> command I could use to reset the soundcard?
>>>
>>> Thanks,
>>>
>>> Emmett
>>>
>>> Csound mailing [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>>
>>> Csound mailing [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>>
>>> Csound mailing [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>>
>>> Csound mailing [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>>
>>> Csound mailing [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>>
>>>
>>> Csound mailing list [hidden email] https://listserv.heanet.ie/
>>> cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/
>>> csound/issues Discussions of bugs and features can be posted here
>>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>
Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Soundcard Left Busy After Killall Csound

zappfinger
In reply to this post by epalaima

sudo kill -9 <pid of csound>

should also work, since you have only one csound process, no need for killall, IMO

Richard
On 15/02/17 21:24, Emmett Palaima wrote:
Yes, now that I replaced killall with killall -9 the problem is solved!

On Wed, Feb 15, 2017 at 3:22 PM, Emmett Palaima <[hidden email]> wrote:
ps aux | grep csound returns: 

pi        1037 81.4  1.3  28500 12404 ?        Rs   20:19   0:56 csound test.csd
pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep --color=auto csound

After I do killall 9 it returns 
pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep --color=auto csound

I think that might have been what I was looking for, but what is the second Csound process?

On Wed, Feb 15, 2017 at 3:12 PM, Guillermo Senna <[hidden email]> wrote:
So after the killall what does 'ps aux | grep csound' returns? If it
still there then it might be a Csound bug, kill it with 'killall -9 csound'



On 15/02/17 17:07, Emmett Palaima wrote:
> I am using Alsa.
>
> After running killall, fuser -fv /dev/snd/* returns:
>
>                      USER        PID ACCESS COMMAND
>
> /dev/snd/controlC0:  pi          747 F.... lxpanel
>
> /dev/snd/pcmC0D0c:   pi         1032 F.... csound
>
> /dev/snd/pcmC0D0p:   pi         1032 F.... csound
>
>
> So perhaps Csound is not being properly exited. Any idea what might be
> causing this?
>
> Here is also the simple csd I am using for testing, just to be thorough:
>
> <CsoundSynthesizer>
>
> <CsOptions>
>
> -odac:hw:0,0
>
> -iadc:hw:0,0
>
> -+rtaudio=alsa
>
> </CsOptions>
>
> <CsInstruments>
>
>
> sr = 48000
>
> ksmps = 128
>
> nchnls = 2
>
> 0dbfs = 1.0
>
>
> turnon "helloWorld"
>
>
> instr helloWorld
>
> ares lfo 1, 440, 2
>
> outs ares, ares
>
> endin
>
>
> </CsInstruments>
>
> <CsScore>
>
> </CsScore>
>
> </CsoundSynthesizer>
>
> On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna <[hidden email]> wrote:
>
>> Is Csound effectively killed after the killall? Alsa or Jack?
>>
>>
>> On 15/02/17 16:44, Emmett Palaima wrote:
>>> Hi, I am working on a project using Csound on the Raspberry Pi. I control
>>> the running of csd files via ssh. I often use the command 'killall
>> csound',
>>> as an easy way to stop all the csound processes I have running. However,
>>> after running this command, the next time I run a csd I get the following
>>> error:
>>>
>>>  *** Cannot open device 'hw:0,0' for audio input: Device or resource busy
>>>
>>> It seems that using killall Csound is confusing the soundcard somehow.
>>> After I reboot the Pi everything works again. I am using the
>> AudioInjector (
>>> http://www.audioinjector.net/).
>>>
>>> Is there an alternative way of quitting Csound via command line, or a
>>> command I could use to reset the soundcard?
>>>
>>> Thanks,
>>>
>>> Emmett
>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Soundcard Left Busy After Killall Csound

gsenna
In reply to this post by jpff
I can't debug it because his example works here in my Ubuntu Studio x86_64.


On 15/02/17 18:08, jpff wrote:

> SIGINT is caugt andinterats wit exitnow
> I suspet tat might be te probem; sigal andle in Top/csound,c
>
> ==J
>
> On Wed, 15 Feb 2017, Guillermo Senna wrote:
>
>> -9 is the same as passing SIGKILL.You can read a little about signals
>> here:
>> http://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html
>>
>>
>> But Csound should behave correctly if you run it like that. Unless it
>> needs to be attached to a tty. I really don't know why the killall
>> wasn't effective. Maybe it was your particular audio interface's alsa
>> module.
>>
>>
>> On 15/02/17 17:45, Emmett Palaima wrote:
>>> I think it is probably something to do with how I am communicating
>>> with the
>>> Pi via ssh. I send each ssh command individually, as in:
>>>
>>> pi@<IP> 'my command'
>>>
>>> killall -9 definitely does the trick though. What does the -9 do? I
>>> can't
>>> seem to find that in the killall docs for command line flags.
>>>
>>> On Wed, Feb 15, 2017 at 3:36 PM, Guillermo Senna <[hidden email]>
>>> wrote:
>>>
>>>> By second process you mean this ▽?
>>>>
>>>> pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00
>>>> grep --color=auto csound
>>>>
>>>> That is just the grep command you passed in "ps aux | grep csound".
>>>> What actually happened is that your first "killall csound" command
>>>> was not
>>>> effective because Csound is ignoring the signal or could not
>>>> unblock. I've
>>>> no idea what it was as your csd seems simple enough.
>>>>
>>>>
>>>>
>>>> On 15/02/17 17:22, Emmett Palaima wrote:
>>>>
>>>> ps aux | grep csound returns:
>>>>
>>>> pi        1037 81.4  1.3  28500 12404 ?        Rs   20:19   0:56
>>>> csound
>>>> test.csd
>>>> pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep
>>>> --color=auto csound
>>>>
>>>>
>>>> After I do killall 9 it returns
>>>>
>>>> pi        1110  0.0  0.2   4276  2008 pts/0    S+   20:20   0:00 grep
>>>> --color=auto csound
>>>>
>>>>
>>>> I think that might have been what I was looking for, but what is
>>>> the second
>>>> Csound process?
>>>>
>>>> On Wed, Feb 15, 2017 at 3:12 PM, Guillermo Senna <[hidden email]>
>>>> <[hidden email]> wrote:
>>>>
>>>>
>>>> So after the killall what does 'ps aux | grep csound' returns? If it
>>>> still there then it might be a Csound bug, kill it with 'killall -9
>>>> csound'
>>>>
>>>>
>>>>
>>>> On 15/02/17 17:07, Emmett Palaima wrote:
>>>>
>>>> I am using Alsa.
>>>>
>>>> After running killall, fuser -fv /dev/snd/* returns:
>>>>
>>>>                      USER        PID ACCESS COMMAND
>>>>
>>>> /dev/snd/controlC0:  pi          747 F.... lxpanel
>>>>
>>>> /dev/snd/pcmC0D0c:   pi         1032 F.... csound
>>>>
>>>> /dev/snd/pcmC0D0p:   pi         1032 F.... csound
>>>>
>>>>
>>>> So perhaps Csound is not being properly exited. Any idea what might be
>>>> causing this?
>>>>
>>>> Here is also the simple csd I am using for testing, just to be
>>>> thorough:
>>>>
>>>> <CsoundSynthesizer>
>>>>
>>>> <CsOptions>
>>>>
>>>> -odac:hw:0,0
>>>>
>>>> -iadc:hw:0,0
>>>>
>>>> -+rtaudio=alsa
>>>>
>>>> </CsOptions>
>>>>
>>>> <CsInstruments>
>>>>
>>>>
>>>> sr = 48000
>>>>
>>>> ksmps = 128
>>>>
>>>> nchnls = 2
>>>>
>>>> 0dbfs = 1.0
>>>>
>>>>
>>>> turnon "helloWorld"
>>>>
>>>>
>>>> instr helloWorld
>>>>
>>>> ares lfo 1, 440, 2
>>>>
>>>> outs ares, ares
>>>>
>>>> endin
>>>>
>>>>
>>>> </CsInstruments>
>>>>
>>>> <CsScore>
>>>>
>>>> </CsScore>
>>>>
>>>> </CsoundSynthesizer>
>>>>
>>>> On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna <[hidden email]>
>>>> <[hidden email]>
>>>>
>>>> wrote:
>>>>
>>>> Is Csound effectively killed after the killall? Alsa or Jack?
>>>>
>>>>
>>>> On 15/02/17 16:44, Emmett Palaima wrote:
>>>>
>>>> Hi, I am working on a project using Csound on the Raspberry Pi. I
>>>>
>>>> control
>>>>
>>>> the running of csd files via ssh. I often use the command 'killall
>>>>
>>>> csound',
>>>>
>>>> as an easy way to stop all the csound processes I have running.
>>>>
>>>> However,
>>>>
>>>> after running this command, the next time I run a csd I get the
>>>>
>>>> following
>>>>
>>>> error:
>>>>
>>>>  *** Cannot open device 'hw:0,0' for audio input: Device or resource
>>>>
>>>> busy
>>>>
>>>> It seems that using killall Csound is confusing the soundcard somehow.
>>>> After I reboot the Pi everything works again. I am using the
>>>>
>>>> AudioInjector (
>>>>
>>>> http://www.audioinjector.net/).
>>>>
>>>> Is there an alternative way of quitting Csound via command line, or a
>>>> command I could use to reset the soundcard?
>>>>
>>>> Thanks,
>>>>
>>>> Emmett
>>>>
>>>> Csound mailing
>>>> [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>         https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>>
>>>> Csound mailing
>>>> [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>         https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>>
>>>> Csound mailing
>>>> [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>         https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>>
>>>> Csound mailing
>>>> [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>         https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>>
>>>> Csound mailing
>>>> [hidden email]://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>         https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>>
>>>>
>>>> Csound mailing list [hidden email]
>>>> https://listserv.heanet.ie/
>>>> cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/
>>>> csound/issues Discussions of bugs and features can be posted here
>>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here