-1

I have edited this with hopes of being more clear.

I got my card working thanks to this site, and this question / answer: Unable to set default input and output audio device on Raspberry jessie

In the answer the first instruction is to delete:
/etc/modprobe.d/alsa-base.conf
I wasn't sure how to do this; if I needed to use an editor, or I could delete text from the terminal

I entered sudo nano /etc/modprobe.d/alsa-base.conf in a terminal and found it to be empty. I did not delete it, and am still unsure how I should go about doing so.
The next instruction is to enter the command aplay -l
I did so and my card is there:

 card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
 card 1: USB [Scarlett 2i2 USB], device 0: USB Audio [USB Audio]
 Subdevices: 1/1
 Subdevice #0: subdevice #0

The next instruction was to edit the file /usr/share/alsa/alsa.conf
I did so, and it currently reads:

  defaults.ctl.card 1
  defaults.pcm.card 1

then I hit ctrl x to exit, Y for yes' to save changes and then enter.

The next instruction was to Create and edit the file ~/.asoundrc
I did so to read:

pcm.!default {
    type hw
    card 1
}

ctl.!default {
    type hw
    card 1
}

then I hit crl X, then y for yes and then enter,
is this the right way?

Everything works as it should until the next start up, and the default card returns to 0 within the ~/.asoundrcfile only.
Any help would be appreciated.

1 Answers1

0

You may compile ALSA by hand and it will use /etc-located system-wide config for sure, and there you can set all the things you need. Another approach is to use UDEV/usb-plugging rule to forcibly enable and set your card as a default as soon as it is detected by the OS

Alexey Vesnin
  • 926
  • 10
  • 17