Csound Csound-dev Csound-tekno Search About

[Csnd-dev] [OT] How to get sound ack

Date2016-02-26 16:56
Fromjpff
Subject[Csnd-dev] [OT] How to get sound ack
Way off topic but I hope someone can explain or fix.

I have a Toshiba laptop tat recently stopped cooperating with csound
and audacity.  I has/had two sound devices -- a HDMI digital and an
analogue PCM, both driven by the same hardware.  The analogue system
ceased working and audacity does not admit its existence.  The effect
is I cannot hear csound output. Creating a WAV file does stuff but
aplay does not play it ("aplay: main:722: audio open error: Device or
resource busy").  However ffplay does work and so does timidity from
midi files so it is not the hardware.

aplay -L says
null
    Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=HDMI,DEV=0
    HDA Intel HDMI, HDMI 0
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
    HDA Intel HDMI, HDMI 1
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
    HDA Intel HDMI, HDMI 2
    HDMI Audio Output
sysdefault:CARD=PCH
    HDA Intel PCH, ALC283 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC283 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

but audacity only reports HDMI for output and PCM for input.

What has gone wrong?  It used to work at least playing stereo files.

Date2016-02-26 18:11
FromFelipe Sateler
SubjectRe: [Csnd-dev] [OT] How to get sound ack
Do you have pulseaudio running? It may have acquired and locked
(monopolized) the device.

Saludos

On 26 February 2016 at 13:56, jpff  wrote:
> Way off topic but I hope someone can explain or fix.
>
> I have a Toshiba laptop tat recently stopped cooperating with csound
> and audacity.  I has/had two sound devices -- a HDMI digital and an
> analogue PCM, both driven by the same hardware.  The analogue system
> ceased working and audacity does not admit its existence.  The effect
> is I cannot hear csound output. Creating a WAV file does stuff but
> aplay does not play it ("aplay: main:722: audio open error: Device or
> resource busy").  However ffplay does work and so does timidity from
> midi files so it is not the hardware.
>
> aplay -L says
> null
>     Discard all samples (playback) or generate zero samples (capture)
> hdmi:CARD=HDMI,DEV=0
>     HDA Intel HDMI, HDMI 0
>     HDMI Audio Output
> hdmi:CARD=HDMI,DEV=1
>     HDA Intel HDMI, HDMI 1
>     HDMI Audio Output
> hdmi:CARD=HDMI,DEV=2
>     HDA Intel HDMI, HDMI 2
>     HDMI Audio Output
> sysdefault:CARD=PCH
>     HDA Intel PCH, ALC283 Analog
>     Default Audio Device
> front:CARD=PCH,DEV=0
>     HDA Intel PCH, ALC283 Analog
>     Front speakers
> surround21:CARD=PCH,DEV=0
>     HDA Intel PCH, ALC283 Analog
>     2.1 Surround output to Front and Subwoofer speakers
> surround40:CARD=PCH,DEV=0
>     HDA Intel PCH, ALC283 Analog
>     4.0 Surround output to Front and Rear speakers
> surround41:CARD=PCH,DEV=0
>     HDA Intel PCH, ALC283 Analog
>     4.1 Surround output to Front, Rear and Subwoofer speakers
> surround50:CARD=PCH,DEV=0
>     HDA Intel PCH, ALC283 Analog
>     5.0 Surround output to Front, Center and Rear speakers
> surround51:CARD=PCH,DEV=0
>     HDA Intel PCH, ALC283 Analog
>     5.1 Surround output to Front, Center, Rear and Subwoofer speakers
> surround71:CARD=PCH,DEV=0
>     HDA Intel PCH, ALC283 Analog
>     7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
>
> but audacity only reports HDMI for output and PCM for input.
>
> What has gone wrong?  It used to work at least playing stereo files.
> ==John ffitch



-- 

Saludos,

Date2016-02-26 19:21
Fromjpff
SubjectRe: [Csnd-dev] [OT] How to get sound back
On Fri, 26 Feb 2016, Felipe Sateler wrote:

> Do you have pulseaudio running? It may have acquired and locked
> (monopolized) the device.
>
> Saludos
>

i have a pulseaudio process running.  No idea why r what it prides.  I 
tried killing it and it restarted immediately.

So, questions:

Why do I need it; what does it provide beyond alsa?

How do I get rid of it, assuming that is the solution?

How do I get alsa to play mono files?  (OK that is slightly different but 
bugs me)


Date2016-02-26 19:56
FromFelipe Sateler
SubjectRe: [Csnd-dev] [OT] How to get sound back
On 26 February 2016 at 16:21, jpff  wrote:
> On Fri, 26 Feb 2016, Felipe Sateler wrote:
>
>> Do you have pulseaudio running? It may have acquired and locked
>> (monopolized) the device.
>
> i have a pulseaudio process running.  No idea why r what it prides.  I tried
> killing it and it restarted immediately.

It may be that then. You could try using the pulseaudio csound
rtmodule (I think it was -+rtaudio=pulse ?).

>
> So, questions:
>
> Why do I need it; what does it provide beyond alsa?

It does stream multiplexing (ie, playing multiple streams at different
volumes). It is capable of mixing streams coming in different formats
(sample size, frequency, number of channels).

>
> How do I get rid of it, assuming that is the solution?

I am not sure it is the solution, but if you want to get rid of it you need to:

1. Disable autospawn (edit /etc/pulse/client.conf and set autospawn=false).
2. If your distro is newfangled, disable the pulseaudio socket and
service: systemctl --user disable pulseaudio.socket pulseaudio.service

>
> How do I get alsa to play mono files?  (OK that is slightly different but
> bugs me)

I don't think aplay is smart enough to do that.


-- 

Saludos,

Date2016-02-26 20:22
FromAnders Genell
SubjectRe: [Csnd-dev] [OT] How to get sound back
> 26 feb. 2016 kl. 20:56 skrev Felipe Sateler :
> 
>> On 26 February 2016 at 16:21, jpff  wrote:
>>> On Fri, 26 Feb 2016, Felipe Sateler wrote:
>>> 
>>> Do you have pulseaudio running? It may have acquired and locked
>>> (monopolized) the device.
>> 
>> i have a pulseaudio process running.  No idea why r what it prides.  I tried
>> killing it and it restarted immediately.
> 
> It may be that then. You could try using the pulseaudio csound
> rtmodule (I think it was -+rtaudio=pulse ?).
> 
>> 
>> So, questions:
>> 
>> Why do I need it; what does it provide beyond alsa?
> 
> It does stream multiplexing (ie, playing multiple streams at different
> volumes). It is capable of mixing streams coming in different formats
> (sample size, frequency, number of channels).
> 
>> 
>> How do I get rid of it, assuming that is the solution?
> 
> I am not sure it is the solution, but if you want to get rid of it you need to:
> 
> 1. Disable autospawn (edit /etc/pulse/client.conf and set autospawn=false).
> 2. If your distro is newfangled, disable the pulseaudio socket and
> service: systemctl --user disable pulseaudio.socket pulseaudio.service
> 
>> 
>> How do I get alsa to play mono files?  (OK that is slightly different but
>> bugs me)
> 
> I don't think aplay is smart enough to do that.
> 
> 
> -- 
> 
> Saludos,
> Felipe Sateler

I think aplay can play a mono file, but you need to play to a device that allows some format adaptation, such as the "plug" pcm device that can be defined in an asoundrc settings file. Recent systems seem to use such a device as default, so it could be enough trying
aplay -c 1 monofile.wav
If you on the other hand specify a specific hardware device (e.g. hw:0,1) the hardware drivers might not accept mono output per se. 

Regards,

Date2016-02-26 20:24
Fromjpff
SubjectRe: [Csnd-dev] [OT] How to get sound back
This gets sillier.  pulseaudio prodes nothing I need but cannot be 
uninstalled.  When I build csound it does not build rtpulse.c and no idea 
why not.  It waswork up to about a week ago and now this.  If pulse has 
locked someting how do i  unlock it?  I never asked it to do anything. 
Really I have been happy without jack for decades and now I am forced to 
jump through hoops to get it just to work!  Surely it is not too much to 
ask that a computer with a sound card can play sounds?

Date2016-02-26 20:59
FromFelipe Sateler
SubjectRe: [Csnd-dev] [OT] How to get sound back
On 26 February 2016 at 17:24, jpff  wrote:
> This gets sillier.  pulseaudio prodes nothing I need but cannot be
> uninstalled. When I build csound it does not build rtpulse.c and no idea
> why not.

Do you have libpulse-dev (or the equivalent dev package)?

> It waswork up to about a week ago and now this.  If pulse has
> locked someting how do i  unlock it?

Did you try what I said? I forgot to add a killall pulseaudio after
changing those files.

-- 

Saludos,

Date2016-02-26 21:00
Fromjoachim heintz
SubjectRe: [Csnd-dev] [OT] How to get sound back
this is probably the reason that people use something like arch linux, 
because then they really know what is on their linux (for instance, no 
pulse audio ...).

	joachim


On 26/02/16 21:24, jpff wrote:
> This gets sillier.  pulseaudio prodes nothing I need but cannot be
> uninstalled.  When I build csound it does not build rtpulse.c and no
> idea why not.  It waswork up to about a week ago and now this.  If pulse
> has locked someting how do i  unlock it?  I never asked it to do
> anything. Really I have been happy without jack for decades and now I am
> forced to jump through hoops to get it just to work!  Surely it is not
> too much to ask that a computer with a sound card can play sounds?
>
> Humph!

Date2016-02-26 22:09
FromTarmo Johannes
SubjectRe: [Csnd-dev] [OT] How to get sound back
Hi,

 sometimes pavucontrol is very useful tool to find out what is going on with
pulseaduio - here you can see to which devices which streams go, what are the
available devices, you can reroute you streams to different devices etc.

Often the problem is that in some moment the default device was not available
or there was some problem and audio and your secondary device (HDMI in your
case then) was chosen instead. It is one click to change it back, if
everytheing else is fine..

Probably pavucontrol is not installed by default but you can get it easily
with zypper.

paman (pulseadio manager) is another tool for something  but much less useful
I remember.

Pulseaudio is of course nothing near professional audio system, but I have
never had big problems with it (using jack for audio work and happy with tha)
- this is personal preference, of course...

tarmo


2016-02-26 22:59 GMT+02:00 Felipe Sateler <fsateler@gmail.com>:
On 26 February 2016 at 17:24, jpff <jpff@codemist.co.uk> wrote:
> This gets sillier.  pulseaudio prodes nothing I need but cannot be
> uninstalled. When I build csound it does not build rtpulse.c and no idea
> why not.

Do you have libpulse-dev (or the equivalent dev package)?

> It waswork up to about a week ago and now this.  If pulse has
> locked someting how do i  unlock it?

Did you try what I said? I forgot to add a killall pulseaudio after
changing those files.

--

Saludos,
Felipe Sateler


Date2016-03-01 17:11
FromKelly Hirai
SubjectRe: [Csnd-dev] [OT] How to get sound back
on my laptop, i keep pluse in there for the onboard controller. i have a
usb audio device i use for live work that pulse doesn't get a hold of.

i do the same for my desktop. pulse takes the mobo ac97. i use alsa and
jack on the ice1217.

they seem to stay out of eachothers way pretty nicely

k.

On 02/26/2016 05:09 PM, Tarmo Johannes wrote:
> Hi,
> 
>  sometimes pavucontrol is very useful tool to find out what is going on
> with
> pulseaduio - here you can see to which devices which streams go, what are
> the
> available devices, you can reroute you streams to different devices etc.
> 
> Often the problem is that in some moment the default device was not
> available
> or there was some problem and audio and your secondary device (HDMI in your
> case then) was chosen instead. It is one click to change it back, if
> everytheing else is fine..
> 
> Probably pavucontrol is not installed by default but you can get it easily
> with zypper.
> 
> paman (pulseadio manager) is another tool for something  but much less
> useful
> I remember.
> 
> Pulseaudio is of course nothing near professional audio system, but I have
> never had big problems with it (using jack for audio work and happy with
> tha)
> - this is personal preference, of course...
> 
> tarmo
> 
> 
> 2016-02-26 22:59 GMT+02:00 Felipe Sateler :
> 
>> On 26 February 2016 at 17:24, jpff  wrote:
>>> This gets sillier.  pulseaudio prodes nothing I need but cannot be
>>> uninstalled. When I build csound it does not build rtpulse.c and no idea
>>> why not.
>>
>> Do you have libpulse-dev (or the equivalent dev package)?
>>
>>> It waswork up to about a week ago and now this.  If pulse has
>>> locked someting how do i  unlock it?
>>
>> Did you try what I said? I forgot to add a killall pulseaudio after
>> changing those files.
>>
>> --
>>
>> Saludos,
>> Felipe Sateler
>>