User avatar
JoelHinson
Posts: 90
Joined: Tue Dec 27, 2016 3:48 am

USB as priamary audio

Thu Jul 04, 2019 8:01 pm

i have tried many online solutions at this and had success with a previous model at this,.. i have a USB audio card and i would like to make that the default audio selection. with sound tests for sure it is working, however to prioritize "pcm" and "ctl" as "1" in the "/usr/share/alsa/alsa.conf" is not getting it done,.. is there a statement that is negating i am wonder?? a thing that knocks it back down to less than the defualt choice,... i believe i have a "model 3",.. what is the best/ sure fire technique at naming the USB as default audio at start up? can anyone say for sure what does work?

LTolledo
Posts: 2165
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: USB as priamary audio

Thu Jul 04, 2019 9:49 pm

What OS and version are you using?

On my RPi3B with Raspbian Stretch with Desktop, I can do that on the top panel where the speaker icon resides.
Right clicking it, selecting the audio device, then rebooting will set it.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

User avatar
JoelHinson
Posts: 90
Joined: Tue Dec 27, 2016 3:48 am

Re: USB as priamary audio

Thu Jul 04, 2019 10:41 pm

i am away from it right now, over at my sisters celebrating the holiday,..i am thinking it is 3?? the desktop looks like this (see attach),.. could you screenshot what you are talking about,.. thank and you if you could.
Attachments
IMG_20190704_173849.jpg
IMG_20190704_173849.jpg (109.97 KiB) Viewed 559 times

User avatar
JoelHinson
Posts: 90
Joined: Tue Dec 27, 2016 3:48 am

Re: USB as priamary audio

Fri Jul 05, 2019 12:55 am

it works here and there,.. except where i want it to work which is a program "puredata"/"pd",.. that program gives this error:

ALSA input error (snd_pcm_open): No such file or directory
ALSA output error (snd_pcm_open): No such file or directory

so then within this program i have toggled every option and no sound ,.. apparently ,...neither "in" nor "out" of the card

User avatar
JoelHinson
Posts: 90
Joined: Tue Dec 27, 2016 3:48 am

Re: USB as priamary audio

Fri Jul 05, 2019 12:47 pm

just to keep this fresh anyone have puredata/ pd? is there an update or another thing recommended to install that works out the bugs? has anyone else seen this error? like i said there is a drop down "media" and that lists all of the sound options and i toggled through all of them and still this error persists.

Man in a van
Posts: 139
Joined: Sat Dec 27, 2014 2:41 pm
Location: Staffordshire, UK.

Re: USB as priamary audio

Fri Jul 05, 2019 3:59 pm

JoelHinson wrote:
Thu Jul 04, 2019 8:01 pm
believe i have a "model 3",.. what is the best/ sure fire technique at naming the USB as default audio at start up? can anyone say for sure what does work?
Have you tried ?

Open Terminal

Code: Select all

Sudo nano /boot/config.txt
Scroll to the bottom of the page and comment out
"dtparam=audio=on"

Code: Select all

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

User avatar
JoelHinson
Posts: 90
Joined: Tue Dec 27, 2016 3:48 am

Re: USB as priamary audio

Sat Jul 06, 2019 2:05 am

man in van, that didnt do the trick,.. thanks for the info though. same "load error" happening with the program

Man in a van
Posts: 139
Joined: Sat Dec 27, 2014 2:41 pm
Location: Staffordshire, UK.

Re: USB as priamary audio

Sat Jul 06, 2019 8:42 am

That's a shame. Did you save and reboot after commenting out the line?

Well we can try this approach. First chect if the usb is present.

Open a terminal and type (this is my rpi4B with Buster)

Code: Select all

lsusb

Code: Select all

[email protected]:~ $ lsusb
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 20b1:000a XMOS Ltd
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device 3 is my usb dac

and then type

Code: Select all

lsmod
this is a snip

Code: Select all

[email protected]:~ $ lsmod
Module                  Size  Used by
fuse                  110592  3
rpcsec_gss_krb5        32768  0
rfcomm                 49152  4
snd_usb_audio         192512  2
[email protected]:~ $
we can see the usb dac is recognised.

There are a couple of ways to go now, It might be best to try this on a backup copy first, just incase.....so try this first.

This is a spoof sheet that I use, I copied it from a posting on the web, but can't now find the link to credit the original author.

I hope it is clear: I'm still using the rpi4B, but I have done this on rpi3B and 3B+ on Stretch.

First of all, check to see what order your cards have been loaded in:

Code: Select all

$ cat /proc/asound/modules
[email protected]:~ $ cat /proc/asound/modules
 0 snd_bcm2835
 1 snd_usb_audio
[email protected]:~ $
Counting cards begins from 0 so the default bcm2835 is loaded first and my USB card is loaded second.

To reorder my cards, I first create a file named /etc/modprobe.d/alsa-base.conf. It can be named anything you want as long as it ends with .conf.

Code: Select all

cd /etc/modprobe.d
sudo touch alsa-base.conf
sudo nano alsa-base.conf
I then paste this into alsa-base.conf

Code: Select all

# This sets the index value of the cards but doesn't reorder.
options snd_usb_audio index=0
options snd_bcm2835 index=1

# Does the reordering.
options snd slots=snd_usb_audio,snd_bcm2835

Save and exit with
Ctrl+x, y, Enter

Code: Select all

sudo reboot
and check that the cards have been reordered

Code: Select all

cat /proc/asound/modules

I have found that with some usb dacs it works if i post the output from

Code: Select all

aplay -L
examples are:
# This sets the index value of the cards but doesn't reorder.
options snd_soc_iqaudio_dac index=0
options snd_bcm2835 index=1

# Does the reordering.
options snd slots=snd_soc_iqaudio_dac,snd_bcm2835
and another
# This sets the index value of the cards but doesn't reorder.
options snd_soc_allo_digione index=0
options snd_bcm2835 index=1

# Does the reordering.
options snd slots=snd_soc_allo_digione,snd_bcm2835
I hope you have better luck this time, remember to maybe try it on a copy first.

ronnie

User avatar
JoelHinson
Posts: 90
Joined: Tue Dec 27, 2016 3:48 am

Re: USB as priamary audio

Sat Jul 06, 2019 11:50 am

my lsmod is throwing a fit? does this look like the issue?
Attachments
IMG_20190706_064753.jpg
IMG_20190706_064753.jpg (46.5 KiB) Viewed 395 times
IMG_20190706_064705.jpg
IMG_20190706_064705.jpg (129.94 KiB) Viewed 395 times
IMG_20190706_064622.jpg
IMG_20190706_064622.jpg (151.29 KiB) Viewed 395 times

Man in a van
Posts: 139
Joined: Sat Dec 27, 2014 2:41 pm
Location: Staffordshire, UK.

Re: USB as priamary audio

Sat Jul 06, 2019 12:09 pm

Is this the device you are using?

[url][https://www.amazon.co.uk/dp/B00KAE2L1C/url]

Man in a van
Posts: 139
Joined: Sat Dec 27, 2014 2:41 pm
Location: Staffordshire, UK.

Re: USB as priamary audio

Sat Jul 06, 2019 12:21 pm

So I did a quick search and came up with this, the ID matches yours 1b3f:2008

https://learn.adafruit.com/usb-audio-ca ... cm108-type

a further google finds

https://raspberrypi.stackexchange.com/q ... nc-to-work

which is 2007 (so similar)

maybe update the firmware?

https://learn.adafruit.com/usb-audio-ca ... cm108-type

I'm sorry but I will have to leave this now.

Keep us posted on your progress and I'll and help further If I can. Maybe someone else (with the card) will drop in.

ronnie

look at this?

https://learn.adafruit.com/usb-audio-ca ... lsa-config

User avatar
JoelHinson
Posts: 90
Joined: Tue Dec 27, 2016 3:48 am

Re: USB as priamary audio

Sat Jul 06, 2019 11:50 pm

its one of these.,..the device makes sound,.. just not with a particular program "pure data". i will look over your posts.

thank you for all your time on this "man in van",.. i found the correct combination,.. for one of these usb adapters running with "pure data" ,.. in the "media" drop down you select "portaudio" and then set it to "default" and then "save all settings".
Attachments
IMG_20190706_184802.jpg
IMG_20190706_184802.jpg (86.28 KiB) Viewed 340 times

Man in a van
Posts: 139
Joined: Sat Dec 27, 2014 2:41 pm
Location: Staffordshire, UK.

Re: USB as priamary audio

Sun Jul 07, 2019 8:55 am

Glad your sorted. ;)

Return to “General discussion”