Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Junior Member
    Join Date
    Nov 2021
    Posts
    24

    how to change the default card permanently - help needed

    hi,
    I have been using LMS on a raspberry pi zero w and 2w for over one year to stream the signal from my turntable with the wavin plugin ("wavin:default" as a favourite) and a sound card with very good results.

    However now i want to do the same with a pi 4b and i have a problem: the USB card is not always set as default card and when this happens, there is no sound...

    Searching the internet i have learned how to set the USB soundcard as default modifying /etc/asound.conf

    I use:

    sudo vi /etc/asound.conf

    to access the file, modify it accordingly, save the changes, and voila, i have my sound again. all good here.

    The problem is that when i reboot the pi, the file returns to its original status and i need to modify it again.....

    Is there a way to save these changes permanently?

    If not, is there any other way to set up the USB soundcard as default permanently?

    thank you for your help.

  2. #2
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    21,634
    Probably no need to do anything with asound.conf

    The default part of the "wavin::default" is ALSA device name.
    "default" is mapped onto a ALSA named card.

    The ALSA name of the card often remains the same so you should be useing somehting like "wavin:ALSANAME"

    use the command "arecord -l" (without quotes and option is lower case letter L not digit one) to shpw what Alsa capture devices are available and pick your card.

  3. #3
    Junior Member
    Join Date
    Nov 2021
    Posts
    24
    Quote Originally Posted by bpa View Post
    Probably no need to do anything with asound.conf

    The default part of the "wavin::default" is ALSA device name.
    "default" is mapped onto a ALSA named card.

    The ALSA name of the card often remains the same so you should be useing somehting like "wavin:ALSANAME"

    use the command "arecord -l" (without quotes and option is lower case letter L not digit one) to shpw what Alsa capture devices are available and pick your card.
    Thanks bpa.
    Forgot to mention:
    I tried as many combinations with the name ("HD") and number ("1") of the card as I could think of:

    wavin:HD
    wavin:HD,0
    wavin:1
    wavin:1,0

    None of those work, only wavin:default works...

  4. #4
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    21,634
    Quote Originally Posted by RPlanto View Post
    Thanks bpa.
    Forgot to mention:
    I tried as many combinations with the name ("HD") and number ("1") of the card as I could think of:

    wavin:HD
    wavin:HD,0
    wavin:1
    wavin:1,0

    None of those work, only wavin:default works...
    What is the output of "arecord -l " ?

  5. #5
    Junior Member
    Join Date
    Nov 2021
    Posts
    24
    tc@pCP:~$ arecord -l
    **** List of CAPTURE Hardware Devices ****
    card 1: HD [USB Sound Blaster HD], device 0: USB Audio [USB Audio]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: HD [USB Sound Blaster HD], device 1: USB Audio [USB Audio #1]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

  6. #6
    Junior Member
    Join Date
    Nov 2021
    Posts
    24
    isn't there a way to make the changes to asound.conf permanent? because this solution works perfectly...

  7. #7
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    2,526
    See "My changes disappeared".

    Although having to modify asound.conf seems a little drastic.

    Most RPi have a headphones jack that usually is the ALSA default.

    Most software *should* be able selection ALSA output by card name, rather than card number or the default which may change.

  8. #8
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    21,634
    Try the following URLs

    wavinlughw:CARD=HD,DEV=0
    wavinlughw:CARD=HD,DEV=1

    edit:
    spaces added to avoid emoji

    wavin: plughw:CARD=HD,DEV=0
    wavin: plughw:CARD=HD,DEV=1

  9. #9
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    21,634
    Quote Originally Posted by Greg Erskine View Post
    See "My changes disappeared".

    Although having to modify asound.conf seems a little drastic.

    Most RPi have a headphones jack that usually is the ALSA default.

    Most software *should* be able selection ALSA output by card name, rather than card number or the default which may change.
    waveinput needs an ALSA capture device so headphone is not relevant.

  10. #10
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    2,526
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •