• Aplay without Sudo

    From Adrian@3:770/3 to All on Sun Dec 26 15:04:50 2021
    I can get Aplay to play a wav file, but only if I use :

    sudo aplay <file>

    without sudo, I get :

    aplay: main:788: audio open error: Device or resource busy.

    Any suggestions on how I get aplay to work without sudo (the wav file is
    owned by the pi user).

    I'm running Stretch on a Pi 3

    Thanks

    Adrian
    --
    To Reply :
    replace "bulleid" with "adrian" - all mail to bulleid is rejected
    Sorry for the rigmarole, If I want spam, I'll go to the shops
    Every time someone says "I don't believe in trolls", another one dies.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Adrian on Sun Dec 26 15:34:59 2021
    On 26/12/2021 15:04, Adrian wrote:
    I can get Aplay to play a wav file, but only if I use :

    sudo aplay <file>

    without sudo, I get :

    aplay: main:788: audio open error: Device or resource busy.

    Any suggestions on how I get aplay to work without sudo (the wav file is owned by the pi user).

    Ah. I remember this one. If I remember its a permissions issue on the
    audio device. I think you can solve it by making the user and the
    devices groups overlap

    here is my pi's /etc/group entry....

    audio:x:29:me,www-data,pulse,root

    I seemed to need all that to get audio to work OK for all the users
    needing to invoke it


    I'm running Stretch on a Pi 3

    Thanks

    Adrian


    --
    In todays liberal progressive conflict-free education system, everyone
    gets full Marx.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Adrian@3:770/3 to tnp@invalid.invalid on Sun Dec 26 16:02:50 2021
    In message <sqa234$6a5$1@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    On 26/12/2021 15:04, Adrian wrote:
    I can get Aplay to play a wav file, but only if I use :
    sudo aplay <file>
    without sudo, I get :
    aplay: main:788: audio open error: Device or resource busy.
    Any suggestions on how I get aplay to work without sudo (the wav
    file is owned by the pi user).

    Ah. I remember this one. If I remember its a permissions issue on the
    audio device. I think you can solve it by making the user and the
    devices groups overlap

    here is my pi's /etc/group entry....

    audio:x:29:me,www-data,pulse,root

    I seemed to need all that to get audio to work OK for all the users
    needing to invoke it


    Thanks, but that doesn't seem to have solved the problem. My pi user
    already had the audio group amongst many others.

    Adrian
    --
    To Reply :
    replace "bulleid" with "adrian" - all mail to bulleid is rejected
    Sorry for the rigmarole, If I want spam, I'll go to the shops
    Every time someone says "I don't believe in trolls", another one dies.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Elvidge@3:770/3 to Adrian on Sun Dec 26 19:36:19 2021
    On 26/12/2021 16:02, Adrian wrote:
    In message <sqa234$6a5$1@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    On 26/12/2021 15:04, Adrian wrote:
    I can get Aplay to play a wav file, but only if I use :
    sudo aplay <file>
    without sudo, I get :
    aplay: main:788: audio open error: Device or resource busy.
    Any suggestions on how I get aplay to work without sudo (the wav
    file is owned by the pi user).

    Ah. I remember this one. If I remember its a permissions issue on the
    audio device. I think you can solve it by making the user and the
    devices groups overlap

    here is my pi's /etc/group entry....

    audio:x:29:me,www-data,pulse,root

    I seemed to need all that to get audio to work OK for all the users
    needing to invoke it


    Thanks, but that doesn't seem to have solved the problem. My pi user
    already had the audio group amongst many others.

    Adrian

    What do these say?
    aplay -l
    amixer contents


    --
    Chris Elvidge
    England
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Elvidge@3:770/3 to Adrian on Sun Dec 26 19:38:50 2021
    On 26/12/2021 16:02, Adrian wrote:
    In message <sqa234$6a5$1@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    On 26/12/2021 15:04, Adrian wrote:
    I can get Aplay to play a wav file, but only if I use :
    sudo aplay <file>
    without sudo, I get :
    aplay: main:788: audio open error: Device or resource busy.
    Any suggestions on how I get aplay to work without sudo (the wav
    file is owned by the pi user).

    Ah. I remember this one. If I remember its a permissions issue on the
    audio device. I think you can solve it by making the user and the
    devices groups overlap

    here is my pi's /etc/group entry....

    audio:x:29:me,www-data,pulse,root

    I seemed to need all that to get audio to work OK for all the users
    needing to invoke it


    Thanks, but that doesn't seem to have solved the problem. My pi user
    already had the audio group amongst many others.

    Adrian

    Also:
    ls -l /dev/snd/



    --
    Chris Elvidge
    England
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Adrian@3:770/3 to chris@mshome.net on Sun Dec 26 20:00:15 2021
    In message <sqagcb$t4d$2@dont-email.me>, Chris Elvidge
    <chris@mshome.net> writes
    Also:
    ls -l /dev/snd/


    **** List of PLAYBACK Hardware Devices ****
    card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC
    HiFi pcm5102a-hifi-0 []
    Subdevices: 0/1
    Subdevice #0: subdevice #0

    and

    numid=1,iface=MIXER,name='PCM'
    ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0
    : values=255,255
    | dBscale-min=-51.00dB,step=0.20dB,mute=0

    and

    drwxr-xr-x 3 root root 140 Dec 26 14:00 snd

    total 0
    drwxr-xr-x 2 root root 60 Dec 26 14:00 by-path
    crw-rw----+ 1 root audio 116, 0 Dec 26 14:00 controlC0
    crw-rw----+ 1 root audio 116, 16 Dec 26 14:00 pcmC0D0p
    crw-rw----+ 1 root audio 116, 1 Dec 26 14:00 seq
    crw-rw----+ 1 root audio 116, 33 Dec 26 14:00 timer


    Thanks

    Adrian
    --
    To Reply :
    replace "bulleid" with "adrian" - all mail to bulleid is rejected
    Sorry for the rigmarole, If I want spam, I'll go to the shops
    Every time someone says "I don't believe in trolls", another one dies.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Elvidge@3:770/3 to Adrian on Sun Dec 26 22:15:29 2021
    On 26/12/2021 20:00, Adrian wrote:
    In message <sqagcb$t4d$2@dont-email.me>, Chris Elvidge
    <chris@mshome.net> writes
    Also:
    ls -l /dev/snd/


    **** List of PLAYBACK Hardware Devices ****
    card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC
    HiFi pcm5102a-hifi-0 []
    Subdevices: 0/1
    Subdevice #0: subdevice #0

    and

    numid=1,iface=MIXER,name='PCM'
    ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0
    : values=255,255
    | dBscale-min=-51.00dB,step=0.20dB,mute=0

    and

    drwxr-xr-x 3 root root 140 Dec 26 14:00 snd

    total 0
    drwxr-xr-x 2 root root 60 Dec 26 14:00 by-path
    crw-rw----+ 1 root audio 116, 0 Dec 26 14:00 controlC0
    crw-rw----+ 1 root audio 116, 16 Dec 26 14:00 pcmC0D0p
    crw-rw----+ 1 root audio 116, 1 Dec 26 14:00 seq
    crw-rw----+ 1 root audio 116, 33 Dec 26 14:00 timer


    Thanks

    Adrian

    Sorry:
    card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC
    Can't help - no experience with this, only with on-board HDMI/Headphones


    --
    Chris Elvidge
    England
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Adrian@3:770/3 to chris@mshome.net on Sun Dec 26 22:58:43 2021
    In message <sqapij$lh2$1@dont-email.me>, Chris Elvidge
    <chris@mshome.net> writes
    Sorry:
    card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC >Can't help - no experience with this, only with on-board HDMI/Headphones


    Thanks for trying.

    Adrian
    --
    To Reply :
    replace "bulleid" with "adrian" - all mail to bulleid is rejected
    Sorry for the rigmarole, If I want spam, I'll go to the shops
    Every time someone says "I don't believe in trolls", another one dies.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Chris Elvidge on Sun Dec 26 23:38:03 2021
    On 26/12/2021 22:15, Chris Elvidge wrote:
    On 26/12/2021 20:00, Adrian wrote:
    In message <sqagcb$t4d$2@dont-email.me>, Chris Elvidge
    <chris@mshome.net> writes
    Also:
    ls -l /dev/snd/


    **** List of PLAYBACK Hardware Devices ****
    card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry
    DAC HiFi pcm5102a-hifi-0 []
       Subdevices: 0/1
       Subdevice #0: subdevice #0

    and

    numid=1,iface=MIXER,name='PCM'
       ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0
       : values=255,255
       | dBscale-min=-51.00dB,step=0.20dB,mute=0

    and

    drwxr-xr-x 3 root root 140 Dec 26 14:00 snd

    total 0
    drwxr-xr-x  2 root root       60 Dec 26 14:00 by-path
    crw-rw----+ 1 root audio 116,  0 Dec 26 14:00 controlC0
    crw-rw----+ 1 root audio 116, 16 Dec 26 14:00 pcmC0D0p
    crw-rw----+ 1 root audio 116,  1 Dec 26 14:00 seq
    crw-rw----+ 1 root audio 116, 33 Dec 26 14:00 timer


    Thanks

    Adrian

    Sorry:
    card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC Can't help - no experience with this, only with on-board HDMI/Headphones


    I have this. which driver did you install

    --
    “Progress is precisely that which rules and regulations did not foresee,”

    – Ludwig von Mises
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Adrian on Sun Dec 26 23:36:38 2021
    On 26/12/2021 20:00, Adrian wrote:
    In message <sqagcb$t4d$2@dont-email.me>, Chris Elvidge
    <chris@mshome.net> writes
    Also:
    ls -l /dev/snd/


    **** List of PLAYBACK Hardware Devices ****
    card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC
    HiFi pcm5102a-hifi-0 []
      Subdevices: 0/1
      Subdevice #0: subdevice #0

    and

    numid=1,iface=MIXER,name='PCM'
      ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0
      : values=255,255
      | dBscale-min=-51.00dB,step=0.20dB,mute=0

    and

    drwxr-xr-x 3 root root 140 Dec 26 14:00 snd

    total 0
    drwxr-xr-x  2 root root       60 Dec 26 14:00 by-path
    crw-rw----+ 1 root audio 116,  0 Dec 26 14:00 controlC0
    crw-rw----+ 1 root audio 116, 16 Dec 26 14:00 pcmC0D0p
    crw-rw----+ 1 root audio 116,  1 Dec 26 14:00 seq
    crw-rw----+ 1 root audio 116, 33 Dec 26 14:00 timer


    Thanks

    Adrian

    i get
    amixer contents
    numid=4,iface=MIXER,name='Master Playback Switch'
    ; type=BOOLEAN,access=rw------,values=1
    : values=off
    numid=3,iface=MIXER,name='Master Playback Volume'
    ; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1
    : values=35000,35000
    numid=2,iface=MIXER,name='Capture Switch'
    ; type=BOOLEAN,access=rw------,values=1
    : values=on
    numid=1,iface=MIXER,name='Capture Volume'
    ; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1
    : values=65536,65536


    for what its worth - otherwise the same

    --
    If I had all the money I've spent on drink...
    ..I'd spend it on drink.

    Sir Henry (at Rawlinson's End)
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Adrian on Sun Dec 26 23:56:31 2021
    On 26/12/2021 22:58, Adrian wrote:
    In message <sqapij$lh2$1@dont-email.me>, Chris Elvidge
    <chris@mshome.net> writes
    Sorry:
    card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC
    Can't help - no experience with this, only with on-board HDMI/Headphones


    Thanks for trying.

    Adrian

    Ok, I think you haven't got the DAC set up right.

    you need thi sin /boot/config.txt
    <snip loadsa stuff>
    # Additional overlays and parameters are documented /boot/overlays/README

    # Enable audio (loads snd_bcm2835)
    #dtparam=audio=on

    dtoverlay=pi3-disable-bt
    dtoverlay=hifiberry-dac

    So you need to disable onboard and use hifiberry-dac for that card

    But I suspect you have done this..or aplay -l wouldnt show the
    device....Hmm...

    Does the *file* you are trying to play have the right permissions?


    --
    Truth welcomes investigation because truth knows investigation will lead
    to converts. It is deception that uses all the other techniques.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to Adrian on Mon Dec 27 00:30:19 2021
    Adrian <bulleid@ku.gro.lioff> wrote:
    I'm running Stretch on a Pi 3

    This is almost certainly not the cause of your problem but I think you
    should bite the bullet anyway and make a new sd card with the latest
    RaspiOS Bullseye. Stretch is now 2 versions out of date and the Raspberry
    Pi Foundation (or is it the Inc.?) only supports the latest release. So
    that should cover you in case anything else pops up.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Adrian@3:770/3 to tnp@invalid.invalid on Mon Dec 27 13:18:00 2021
    In message <sqaucr$ftp$2@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    I have this. which driver did you install


    Not sure, but I installed using the instructions here :

    <https://learn.adafruit.com/adafruit-speaker-bonnet-for-raspberry-pi/rasp berry-pi-usage>

    tinyurl.com/2p8apjvx if the wrapping mangles the URL

    Thanks

    Adrian
    --
    To Reply :
    replace "bulleid" with "adrian" - all mail to bulleid is rejected
    Sorry for the rigmarole, If I want spam, I'll go to the shops
    Every time someone says "I don't believe in trolls", another one dies.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Adrian@3:770/3 to tnp@invalid.invalid on Mon Dec 27 13:40:51 2021
    In message <sqavff$ldq$1@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    Ok, I think you haven't got the DAC set up right.

    you need thi sin /boot/config.txt
    <snip loadsa stuff>
    # Additional overlays and parameters are documented /boot/overlays/README

    # Enable audio (loads snd_bcm2835)
    #dtparam=audio=on

    Already done

    dtoverlay=pi3-disable-bt
    dtoverlay=hifiberry-dac


    I've added the first, the second was already there.

    Having made that change, I've rebooted, and still Device or resource
    busy, but works fine if I use sudo.

    Does the *file* you are trying to play have the right permissions?


    Yes, I'm running as "pi", and the file is owned/group by pi with
    rw-r--r--

    Thanks

    Adrian
    --
    To Reply :
    replace "bulleid" with "adrian" - all mail to bulleid is rejected
    Sorry for the rigmarole, If I want spam, I'll go to the shops
    Every time someone says "I don't believe in trolls", another one dies.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to Adrian on Mon Dec 27 13:47:44 2021
    Adrian <bulleid@ku.gro.lioff> wrote:
    In message <sqavff$ldq$1@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    dtoverlay=pi3-disable-bt

    I've added the first, the second was already there.

    I think that was just another line from his config file, not relevant to
    this issue.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Adrian on Mon Dec 27 13:45:33 2021
    On 27/12/2021 13:18, Adrian wrote:
    In message <sqaucr$ftp$2@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    I have this. which driver did you install


    Not sure, but I installed using the instructions here :

    <https://learn.adafruit.com/adafruit-speaker-bonnet-for-raspberry-pi/rasp berry-pi-usage>

    That does not appear to be for your hardware.


    tinyurl.com/2p8apjvx  if the wrapping mangles the URL

    Thanks

    Adrian


    --
    "The most difficult subjects can be explained to the most slow witted
    man if he has not formed any idea of them already; but the simplest
    thing cannot be made clear to the most intelligent man if he is firmly persuaded that he knows already, without a shadow of doubt, what is laid
    before him."

    - Leo Tolstoy
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Adrian on Mon Dec 27 13:57:15 2021
    On 27/12/2021 13:40, Adrian wrote:
    In message <sqavff$ldq$1@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    Ok, I think you haven't got the DAC set up right.

    you need thi sin /boot/config.txt
    <snip loadsa stuff>
    # Additional overlays and parameters are documented /boot/overlays/README

    # Enable audio (loads snd_bcm2835)
    #dtparam=audio=on

    Already done

    dtoverlay=pi3-disable-bt
    dtoverlay=hifiberry-dac


    I've added the first, the second was already there.

    Having made that change, I've rebooted, and still Device or resource
    busy, but works fine if I use sudo.

    So there is no fundamental issue with missing drivers.

    Does  the *file* you are trying to play have the right permissions?


    Yes, I'm running as "pi", and the file is owned/group by pi with rw-r--r--

    Hmm.

    It looks like somehow the /dev/snd perms are wrong, but I am struggling
    to see what difference your setup is from mine

    I tested it and I can play with myself as the user.

    $ ls -l /dev | grep snd
    drwxr-xr-x 3 root root 140 Dec 9 13:42 snd

    $ ls -l /dev/snd
    total 0
    drwxr-xr-x 2 root root 60 Dec 9 13:42 by-path
    crw-rw---- 1 root audio 116, 0 Dec 9 13:42 controlC0
    crw-rw---- 1 root audio 116, 16 Dec 9 13:42 pcmC0D0p
    crw-rw---- 1 root audio 116, 1 Dec 9 13:17 seq
    crw-rw---- 1 root audio 116, 33 Dec 9 13:42 timer

    $ grep audio /etc/group

    audio:x:29:me,www-data,pulse,root


    that's my setup that works.

    I think I had to add myself to get it to work from my user command line,
    and www-data to get it to work when invoked by the apache webserver,
    which is how I control the sound system...or else write a setuid program...

    See if yours differs at all.


    Thanks

    Adrian


    --
    How fortunate for governments that the people they administer don't think.

    Adolf Hitler
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to A. Dumas on Mon Dec 27 14:04:53 2021
    On 27/12/2021 13:47, A. Dumas wrote:
    Adrian <bulleid@ku.gro.lioff> wrote:
    In message <sqavff$ldq$1@dont-email.me>, The Natural Philosopher
    <tnp@invalid.invalid> writes
    dtoverlay=pi3-disable-bt

    I've added the first, the second was already there.

    I think that was just another line from his config file, not relevant to
    this issue.


    I think it is...

    but can't find out why.. oh it disables bluetooth and is recommended
    somewhere for better wifi, which I had issues with.

    My bad.

    https://www.hifiberry.com/docs/software/configuring-linux-3-18-x/

    is I think how I got mine working BUT I am fairly sure I wouldn't have
    stuck myself and www-data into the audio group without good reasons. In
    short I think I had this problem and that is how I fixed it.

    Anyway if I can get Adrian to a working config by duping mine, it's a
    result.



    --
    Of what good are dead warriors? … Warriors are those who desire battle
    more than peace. Those who seek battle despite peace. Those who thump
    their spears on the ground and talk of honor. Those who leap high the
    battle dance and dream of glory … The good of dead warriors, Mother, is
    that they are dead.
    Sheri S Tepper: The Awakeners.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Adrian@3:770/3 to tnp@invalid.invalid on Mon Dec 27 14:17:37 2021
    In message <sqcgns$740$1@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    It looks like somehow the /dev/snd perms are wrong, but I am struggling
    to see what difference your setup is from mine

    I tested it and I can play with myself as the user.

    $ ls -l /dev | grep snd
    drwxr-xr-x 3 root root 140 Dec 9 13:42 snd

    $ ls -l /dev/snd
    total 0
    drwxr-xr-x 2 root root 60 Dec 9 13:42 by-path
    crw-rw---- 1 root audio 116, 0 Dec 9 13:42 controlC0
    crw-rw---- 1 root audio 116, 16 Dec 9 13:42 pcmC0D0p
    crw-rw---- 1 root audio 116, 1 Dec 9 13:17 seq
    crw-rw---- 1 root audio 116, 33 Dec 9 13:42 timer

    $ grep audio /etc/group

    audio:x:29:me,www-data,pulse,root


    that's my setup that works.

    I think I had to add myself to get it to work from my user command
    line, and www-data to get it to work when invoked by the apache
    webserver, which is how I control the sound system...or else write a
    setuid program...

    See if yours differs at all.


    Times and dates aside, my /dev/snd appears to be the same as yours. Oh
    hang on, there is a difference. The four entries with permissions
    starting "c" all have permissions of crw-rw----+


    The audio group is :

    audio:x:29:pi

    I only need it to work for the pi user, so that should be OK.

    Thanks

    Adrian
    --
    To Reply :
    replace "bulleid" with "adrian" - all mail to bulleid is rejected
    Sorry for the rigmarole, If I want spam, I'll go to the shops
    Every time someone says "I don't believe in trolls", another one dies.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Adrian@3:770/3 to tnp@invalid.invalid on Mon Dec 27 14:29:34 2021
    In message <sqcg1t$1pb$2@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    On 27/12/2021 13:18, Adrian wrote:
    In message <sqaucr$ftp$2@dont-email.me>, The Natural Philosopher >><tnp@invalid.invalid> writes
    I have this. which driver did you install

    Not sure, but I installed using the instructions here :
    <https://learn.adafruit.com/adafruit-speaker-bonnet-for-raspberry-pi/ra>>sp >> berry-pi-usage>

    That does not appear to be for your hardware.


    Curious. I got the hardware from PiHut, and that was the site that they
    gave for the setup.

    Adrian
    --
    To Reply :
    replace "bulleid" with "adrian" - all mail to bulleid is rejected
    Sorry for the rigmarole, If I want spam, I'll go to the shops
    Every time someone says "I don't believe in trolls", another one dies.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Elvidge@3:770/3 to The Natural Philosopher on Mon Dec 27 14:46:03 2021
    On 27/12/2021 13:57, The Natural Philosopher wrote:
    On 27/12/2021 13:40, Adrian wrote:
    In message <sqavff$ldq$1@dont-email.me>, The Natural Philosopher
    <tnp@invalid.invalid> writes
    Ok, I think you haven't got the DAC set up right.

    you need thi sin /boot/config.txt
    <snip loadsa stuff>
    # Additional overlays and parameters are documented
    /boot/overlays/README

    # Enable audio (loads snd_bcm2835)
    #dtparam=audio=on

    Already done

    dtoverlay=pi3-disable-bt
    dtoverlay=hifiberry-dac


    I've added the first, the second was already there.

    Having made that change, I've rebooted, and still Device or resource
    busy, but works fine if I use sudo.

    So there is no fundamental issue with missing drivers.

    Does the *file* you are trying to play have the right permissions?


    Yes, I'm running as "pi", and the file is owned/group by pi with
    rw-r--r--

    Hmm.

    It looks like somehow the /dev/snd perms are wrong, but I am struggling
    to see what difference your setup is from mine

    I tested it and I can play with myself as the user.

    "Fnarr, fnarr"


    $ ls -l /dev | grep snd
    drwxr-xr-x 3 root root 140 Dec 9 13:42 snd

    $ ls -l /dev/snd
    total 0
    drwxr-xr-x 2 root root 60 Dec 9 13:42 by-path
    crw-rw---- 1 root audio 116, 0 Dec 9 13:42 controlC0
    crw-rw---- 1 root audio 116, 16 Dec 9 13:42 pcmC0D0p
    crw-rw---- 1 root audio 116, 1 Dec 9 13:17 seq
    crw-rw---- 1 root audio 116, 33 Dec 9 13:42 timer

    $ grep audio /etc/group

    audio:x:29:me,www-data,pulse,root


    that's my setup that works.

    I think I had to add myself to get it to work from my user command line,
    and www-data to get it to work when invoked by the apache webserver,
    which is how I control the sound system...or else write a setuid program...

    See if yours differs at all.


    Thanks

    Adrian




    --
    Chris Elvidge
    England
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to Adrian on Mon Dec 27 14:49:49 2021
    Adrian <bulleid@ku.gro.lioff> wrote:
    In message <sqcg1t$1pb$2@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    That does not appear to be for your hardware.

    Curious. I got the hardware from PiHut, and that was the site that they
    gave for the setup.

    The hifiberry overlay is very general and used for different boards. I
    think iqaudio is the only audio board manufacturer with its own, different overlay? That's the one I have, anyway. So it could be that the PiHut was right.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Adrian on Mon Dec 27 14:54:06 2021
    On 27/12/2021 14:17, Adrian wrote:
    In message <sqcgns$740$1@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    It looks like somehow the /dev/snd perms are wrong, but I am
    struggling to see what difference your setup is from mine

    I tested it and I can play with myself as the user.

    $ ls -l /dev | grep snd
    drwxr-xr-x 3 root root         140 Dec  9 13:42 snd

    $ ls -l /dev/snd
    total 0
    drwxr-xr-x 2 root root       60 Dec  9 13:42 by-path
    crw-rw---- 1 root audio 116,  0 Dec  9 13:42 controlC0
    crw-rw---- 1 root audio 116, 16 Dec  9 13:42 pcmC0D0p
    crw-rw---- 1 root audio 116,  1 Dec  9 13:17 seq
    crw-rw---- 1 root audio 116, 33 Dec  9 13:42 timer

    $ grep audio /etc/group

    audio:x:29:me,www-data,pulse,root


    that's  my setup that works.

    I think I had to add myself to get it to work from my user command
    line, and www-data to get it to work when invoked by the apache
    webserver, which is how I control the sound system...or else write a
    setuid program...

    See if yours differs at all.


    Times and dates aside, my /dev/snd appears to be the same as yours. Oh
    hang on, there is a difference.  The four entries with permissions
    starting "c" all have permissions of  crw-rw----+


    The audio group is :

    audio:x:29:pi

    not sure it doesn't need root and pulse.


    I only need it to work for the pi user, so that should be OK.

    Thanks

    Adrian


    --
    You can get much farther with a kind word and a gun than you can with a
    kind word alone.

    Al Capone
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Adrian on Mon Dec 27 14:55:17 2021
    On 27/12/2021 14:29, Adrian wrote:
    In message <sqcg1t$1pb$2@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    On 27/12/2021 13:18, Adrian wrote:
    In message <sqaucr$ftp$2@dont-email.me>, The Natural Philosopher
    <tnp@invalid.invalid> writes
    I have this. which driver did you install

     Not sure, but I installed using the instructions here :

    <https://learn.adafruit.com/adafruit-speaker-bonnet-for-raspberry-pi/ra>>sp >>>
    berry-pi-usage>

    That does not appear to be for your hardware.


    Curious.  I got the hardware from PiHut, and that was the site that they gave for the setup.

    Adrian
    so did i but i decided that of anyone knew it would be hifiberry!

    anyway it all eventually worked



    --
    You can get much farther with a kind word and a gun than you can with a
    kind word alone.

    Al Capone
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to A. Dumas on Mon Dec 27 14:56:10 2021
    On 27/12/2021 14:49, A. Dumas wrote:
    Adrian <bulleid@ku.gro.lioff> wrote:
    In message <sqcg1t$1pb$2@dont-email.me>, The Natural Philosopher
    <tnp@invalid.invalid> writes
    That does not appear to be for your hardware.

    Curious. I got the hardware from PiHut, and that was the site that they
    gave for the setup.

    The hifiberry overlay is very general and used for different boards.

    I had tow hifiberry overlays one of which worked and the other did not



    --
    “It is hard to imagine a more stupid decision or more dangerous way of
    making decisions than by putting those decisions in the hands of people
    who pay no price for being wrong.”

    Thomas Sowell
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Chris Elvidge on Mon Dec 27 14:57:36 2021
    On 27/12/2021 14:46, Chris Elvidge wrote:
    On 27/12/2021 13:57, The Natural Philosopher wrote:

    I tested it and I can play with myself as the user.

    "Fnarr, fnarr"

    bugger. missed the comma.

    "I tested it and I can play, with myself as the user."


    --
    “It is hard to imagine a more stupid decision or more dangerous way of
    making decisions than by putting those decisions in the hands of people
    who pay no price for being wrong.”

    Thomas Sowell
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Adrian@3:770/3 to tnp@invalid.invalid on Mon Dec 27 15:41:39 2021
    In message <sqck2e$s22$3@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    not sure it doesn't need root and pulse.


    I've tried adding root and pulse. Root adds OK, but as I don't have a
    user called pulse, I can't add that.

    Still get the same error.

    Adrian
    --
    To Reply :
    replace "bulleid" with "adrian" - all mail to bulleid is rejected
    Sorry for the rigmarole, If I want spam, I'll go to the shops
    Every time someone says "I don't believe in trolls", another one dies.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Adrian on Mon Dec 27 16:01:42 2021
    On 27/12/2021 15:41, Adrian wrote:
    In message <sqck2e$s22$3@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    not sure it doesn't need root and   pulse.


    I've tried adding root and pulse.  Root adds OK, but as I don't have a
    user called pulse, I can't add that.

    Still get the same error.

    Adrian

    you haven't installed pulseaudio?
    check this and lets see what gives

    $ aplay -L

    null
    Discard all samples (playback) or generate zero samples (capture)
    default
    Playback/recording through the PulseAudio sound server sysdefault:CARD=sndrpihifiberry
    snd_rpi_hifiberry_dac,
    Default Audio Device
    dmix:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct sample mixing device
    dsnoop:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct sample snooping device
    hw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct hardware device without any conversions plughw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Hardware device with all software conversions

    You can foirce use of te card with e.g.

    aplay -D sysdefault <file>


    I think



    --
    The theory of Communism may be summed up in one sentence: Abolish all
    private property.

    Karl Marx
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to The Natural Philosopher on Mon Dec 27 16:59:30 2021
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    you haven't installed pulseaudio?

    He's still on Stretch. I think getting into too much detail is not really useful until he at least upgrades to Buster.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Adrian@3:770/3 to tnp@invalid.invalid on Mon Dec 27 17:04:33 2021
    In message <sqco17$p35$1@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    you haven't installed pulseaudio?

    I have now, and things have changed (see below)

    check this and lets see what gives

    $ aplay -L

    null
    Discard all samples (playback) or generate zero samples (capture)
    default
    Playback/recording through the PulseAudio sound server
    sysdefault:CARD=sndrpihifiberry
    snd_rpi_hifiberry_dac,
    Default Audio Device
    dmix:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct sample mixing device
    dsnoop:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct sample snooping device
    hw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct hardware device without any conversions
    plughw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Hardware device with all software conversions


    null
    Discard all samples (playback) or generate zero samples (capture) speakerbonnet
    dmixer
    softvol
    default
    Playback/recording through the PulseAudio sound server sysdefault:CARD=sndrpihifiberry
    snd_rpi_hifiberry_dac,
    Default Audio Device
    dmix:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct sample mixing device
    dsnoop:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct sample snooping device
    hw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct hardware device without any conversions plughw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Hardware device with all software conversions

    So I get some extra stuff at the top.

    Now, when I try aplay, I don't get any errors, but neither do I get any
    noise (but I still do with sudo). Progress of sorts I suppose.

    You can foirce use of te card with e.g.

    aplay -D sysdefault <file>

    It doesn't like that, I get :

    ALSA lib confmisc.c:767:(parse_card) cannot find card '1'
    ALSA lib conf.c:4528:(_snd_config_evaluate) function
    snd_func_card_driver returned error: No such file or directory
    ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
    ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat
    returned error: No such file or directory
    ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
    ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer
    returned error: No such file or directory
    ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
    ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM sysdefault
    aplay: main:788: audio open error: No such file or directory

    Thanks

    Adrian
    --
    To Reply :
    replace "bulleid" with "adrian" - all mail to bulleid is rejected
    Sorry for the rigmarole, If I want spam, I'll go to the shops
    Every time someone says "I don't believe in trolls", another one dies.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Adrian on Mon Dec 27 17:21:55 2021
    On 27/12/2021 17:04, Adrian wrote:
    In message <sqco17$p35$1@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    you haven't installed pulseaudio?

    I have now, and things have changed (see below)

    check this and lets see what gives

    $ aplay -L

    null
    Discard all samples (playback) or generate zero samples (capture)
    default
    Playback/recording through the PulseAudio sound server
    sysdefault:CARD=sndrpihifiberry
    snd_rpi_hifiberry_dac,
    Default Audio Device
    dmix:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct sample mixing device
    dsnoop:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct sample snooping device
    hw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct hardware device without any conversions
    plughw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Hardware device with all software conversions


    null
    Discard all samples (playback) or generate zero samples (capture) speakerbonnet
    dmixer
    softvol
    default
    Playback/recording through the PulseAudio sound server sysdefault:CARD=sndrpihifiberry
    snd_rpi_hifiberry_dac,
    Default Audio Device
    dmix:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct sample mixing device
    dsnoop:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct sample snooping device
    hw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct hardware device without any conversions plughw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Hardware device with all software conversions

    So I get some extra stuff at the top.

    Now, when I try aplay, I don't get any errors, but neither do I get any
    noise (but I still do with sudo). Progress of sorts I suppose.

    Hmm. I would try simply installing pulseaudio and see what happens

    Go with the flow, man , we are all slaves to the Poettering.




    --
    The lifetime of any political organisation is about three years before
    its been subverted by the people it tried to warn you about.

    Anon.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Adrian@3:770/3 to tnp@invalid.invalid on Mon Dec 27 18:43:37 2021
    In message <sqcsnk$r3u$1@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
    Hmm. I would try simply installing pulseaudio and see what happens


    I did before that posting, hence the change in behaviour.

    Go with the flow, man , we are all slaves to the Poettering.

    B****r, I thought I'd escaped from slavery a while back.

    Adrian
    --
    To Reply :
    replace "bulleid" with "adrian" - all mail to bulleid is rejected
    Sorry for the rigmarole, If I want spam, I'll go to the shops
    Every time someone says "I don't believe in trolls", another one dies.
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)