Csound Csound-dev Csound-tekno Search About

Soundcard Left Busy After Killall Csound

Date2017-02-15 19:44
FromEmmett Palaima
SubjectSoundcard Left Busy After Killall Csound
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 Csound@listserv.heanet.ie 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

Date2017-02-15 19:53
FromGuillermo Senna
SubjectRe: Soundcard Left Busy After Killall Csound
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
> Csound@listserv.heanet.ie
> 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
Csound@listserv.heanet.ie
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

Date2017-02-15 20:07
FromEmmett Palaima
SubjectRe: Soundcard Left Busy After Killall Csound
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 <gsenna@gmail.com> 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
> Csound@listserv.heanet.ie
> 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
Csound@listserv.heanet.ie
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 Csound@listserv.heanet.ie 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

Date2017-02-15 20:12
FromGuillermo Senna
SubjectRe: Soundcard Left Busy After Killall Csound
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:
>
> 
>
> 
>
> -odac:hw:0,0
>
> -iadc:hw:0,0
>
> -+rtaudio=alsa
>
> 
>
> 
>
>
> sr = 48000
>
> ksmps = 128
>
> nchnls = 2
>
> 0dbfs = 1.0
>
>
> turnon "helloWorld"
>
>
> instr helloWorld
>
> ares lfo 1, 440, 2
>
> outs ares, ares
>
> endin
>
>
> 
>
> 
>
> 
>
> 
>
> On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna  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
>>> Csound@listserv.heanet.ie
>>> 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
>> Csound@listserv.heanet.ie
>> 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
> Csound@listserv.heanet.ie
> 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
Csound@listserv.heanet.ie
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

Date2017-02-15 20:22
FromEmmett Palaima
SubjectRe: Soundcard Left Busy After Killall Csound
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 <gsenna@gmail.com> 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 <gsenna@gmail.com> 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
>>> Csound@listserv.heanet.ie
>>> 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
>> Csound@listserv.heanet.ie
>> 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
> Csound@listserv.heanet.ie
> 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
Csound@listserv.heanet.ie
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 Csound@listserv.heanet.ie 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

Date2017-02-15 20:24
FromEmmett Palaima
SubjectRe: Soundcard Left Busy After Killall Csound
Yes, now that I replaced killall with killall -9 the problem is solved!

On Wed, Feb 15, 2017 at 3:22 PM, Emmett Palaima <epalaima@berklee.edu> 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 <gsenna@gmail.com> 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 <gsenna@gmail.com> 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
>>> Csound@listserv.heanet.ie
>>> 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
>> Csound@listserv.heanet.ie
>> 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
> Csound@listserv.heanet.ie
> 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
Csound@listserv.heanet.ie
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 Csound@listserv.heanet.ie 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

Date2017-02-15 20:36
FromGuillermo Senna
SubjectRe: Soundcard Left Busy After Killall Csound

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 <gsenna@gmail.com> 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 <gsenna@gmail.com>
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
Csound@listserv.heanet.ie
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
Csound@listserv.heanet.ie
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
Csound@listserv.heanet.ie
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
Csound@listserv.heanet.ie
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
Csound@listserv.heanet.ie
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



Date2017-02-15 20:45
FromEmmett Palaima
SubjectRe: Soundcard Left Busy After Killall Csound
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 <gsenna@gmail.com> 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 <gsenna@gmail.com> 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 <gsenna@gmail.com>
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
Csound@listserv.heanet.ie
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
Csound@listserv.heanet.ie
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
Csound@listserv.heanet.ie
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
Csound@listserv.heanet.ie
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
Csound@listserv.heanet.ie
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 Csound@listserv.heanet.ie 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 Csound@listserv.heanet.ie 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

Date2017-02-15 20:45
FromEmmett Palaima
SubjectRe: Soundcard Left Busy After Killall Csound
* ssh pi@<IP> 'my command'

On Wed, Feb 15, 2017 at 3:45 PM, Emmett Palaima <epalaima@berklee.edu> 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 <gsenna@gmail.com> 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 <gsenna@gmail.com> 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 <gsenna@gmail.com>
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
Csound@listserv.heanet.ie
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
Csound@listserv.heanet.ie
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
Csound@listserv.heanet.ie
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
Csound@listserv.heanet.ie
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
Csound@listserv.heanet.ie
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 Csound@listserv.heanet.ie 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 Csound@listserv.heanet.ie 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

Date2017-02-15 20:59
FromGuillermo Senna
SubjectRe: Soundcard Left Busy After Killall Csound
-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@ '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  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   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:
>>
>> 
>>
>> 
>>
>> -odac:hw:0,0
>>
>> -iadc:hw:0,0
>>
>> -+rtaudio=alsa
>>
>> 
>>
>> 
>>
>>
>> sr = 48000
>>
>> ksmps = 128
>>
>> nchnls = 2
>>
>> 0dbfs = 1.0
>>
>>
>> turnon "helloWorld"
>>
>>
>> instr helloWorld
>>
>> ares lfo 1, 440, 2
>>
>> outs ares, ares
>>
>> endin
>>
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna  
>>
>> 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 listCsound@listserv.heanet.iehttps://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 listCsound@listserv.heanet.iehttps://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 listCsound@listserv.heanet.iehttps://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 listCsound@listserv.heanet.iehttps://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 listCsound@listserv.heanet.iehttps://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 Csound@listserv.heanet.ie 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
> Csound@listserv.heanet.ie
> 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
Csound@listserv.heanet.ie
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

Date2017-02-15 21:08
Fromjpff
SubjectRe: Soundcard Left Busy After Killall Csound
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@ '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  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   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:
>>>
>>> 
>>>
>>> 
>>>
>>> -odac:hw:0,0
>>>
>>> -iadc:hw:0,0
>>>
>>> -+rtaudio=alsa
>>>
>>> 
>>>
>>> 
>>>
>>>
>>> sr = 48000
>>>
>>> ksmps = 128
>>>
>>> nchnls = 2
>>>
>>> 0dbfs = 1.0
>>>
>>>
>>> turnon "helloWorld"
>>>
>>>
>>> instr helloWorld
>>>
>>> ares lfo 1, 440, 2
>>>
>>> outs ares, ares
>>>
>>> endin
>>>
>>>
>>> 
>>>
>>> 
>>>
>>> 
>>>
>>> 
>>>
>>> On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna  
>>>
>>> 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 listCsound@listserv.heanet.iehttps://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 listCsound@listserv.heanet.iehttps://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 listCsound@listserv.heanet.iehttps://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 listCsound@listserv.heanet.iehttps://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 listCsound@listserv.heanet.iehttps://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 Csound@listserv.heanet.ie 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
>> Csound@listserv.heanet.ie
>> 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
> Csound@listserv.heanet.ie
> 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
Csound@listserv.heanet.ie
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

Date2017-02-15 21:12
FromRichard
SubjectRe: Soundcard Left Busy After Killall Csound

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 <epalaima@berklee.edu> 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 <gsenna@gmail.com> 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 <gsenna@gmail.com> 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
>>> Csound@listserv.heanet.ie
>>> 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
>> Csound@listserv.heanet.ie
>> 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
> Csound@listserv.heanet.ie
> 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
Csound@listserv.heanet.ie
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 Csound@listserv.heanet.ie 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


Date2017-02-15 21:18
FromGuillermo Senna
SubjectRe: Soundcard Left Busy After Killall Csound
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@ '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 
>>> 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 
>>>>  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:
>>>>
>>>> 
>>>>
>>>> 
>>>>
>>>> -odac:hw:0,0
>>>>
>>>> -iadc:hw:0,0
>>>>
>>>> -+rtaudio=alsa
>>>>
>>>> 
>>>>
>>>> 
>>>>
>>>>
>>>> sr = 48000
>>>>
>>>> ksmps = 128
>>>>
>>>> nchnls = 2
>>>>
>>>> 0dbfs = 1.0
>>>>
>>>>
>>>> turnon "helloWorld"
>>>>
>>>>
>>>> instr helloWorld
>>>>
>>>> ares lfo 1, 440, 2
>>>>
>>>> outs ares, ares
>>>>
>>>> endin
>>>>
>>>>
>>>> 
>>>>
>>>> 
>>>>
>>>> 
>>>>
>>>> 
>>>>
>>>> On Wed, Feb 15, 2017 at 2:53 PM, Guillermo Senna 
>>>> 
>>>>
>>>> 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
>>>> listCsound@listserv.heanet.iehttps://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
>>>> listCsound@listserv.heanet.iehttps://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
>>>> listCsound@listserv.heanet.iehttps://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
>>>> listCsound@listserv.heanet.iehttps://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
>>>> listCsound@listserv.heanet.iehttps://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 Csound@listserv.heanet.ie
>>>> 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
>>> Csound@listserv.heanet.ie
>>> 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
>> Csound@listserv.heanet.ie
>> 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
> Csound@listserv.heanet.ie
> 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
Csound@listserv.heanet.ie
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