configuring USB sound card from Yast

Hello.

I’ve bought myself E-MU 0404 USB sound-card. I’ve managed to get it working, but not perfectly. What did I do to get it working (on OpenSUSE 11.0):
When I first switched it on, dmesg showed it correctly, but Yast2 didn’t see it at all. The card disappeared also when I restarted ALSA. To resolve this, I added into /etc/modprobe.d/sound:


options snd slots=snd-via82xx,snd-emu10k1,snd-usb-audio
alias snd-card-1 snd-emu10k1
alias snd-card-2 snd-usb-audio

Now Yast2 shows the sound card, but I can’t play any sounds into it. Google turned up, that its bitrate should be 48000. So I got it working when I put into ~/.asoundrc:

pcm.!default {
  type plug
  slave.pcm {
    type hw
    card USB
    rate 48000
  }
}
ctl.!default {
  type plug
  slave.ctl {
    type hw
    card USB
    rate 48000
  }
}

The current problem are:

  1. I can’t play multiple sounds simultaneously
  2. changing volume from alsamix doesn’t work

I guess I could tweak ALSA the correct way, but I hope that it’s easier to let Yast to take care of all the correct ALSA configuring, and somehow add just some crucial ALSA parameters (eg. bitrate). Is it possible?

Put all your media players on alsa (and not auto, nor oss, nor other audio source). They need to all be on alsa for a mix to work.

Check to ensure your volume is not associated with your sound device that is not in use.

Configuring an USB sound card with YaST (which is not shown originaly in YaST > Hardware > Sound).

When in YaST > Hardware > Sound click Add, in the left column select Generic, in the right column there is but one choice USB Audio, so check that one and click next.

Worked for several USB sound cards.

Put all your media players on alsa (and not auto, nor oss, nor other audio source). They need to all be on alsa for a mix to work.

This was caused purely by my ~/.asoundrc. I did a copy-paste from ALSA wiki page about dmixing, and it’s fixed now.
Actually, what I really need my ~/.asoundrc for, is to say which device to use by default (and to use dmixing). When I don’t have ~/.asoundrc in place, I get with alsaplayer:

$ alsaplayer -o alsa  ~/Music/fun/opensource.ogg
error on set_format SND_PCM_FORMAT_S16
Unavailable hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S24_3LE
SUBFORMAT:  STD
SAMPLE_BITS: 24
FRAME_BITS: [48 96]
CHANNELS: [2 4]
RATE: [44100 192000]
PERIOD_TIME: [1000 1981429)
PERIOD_SIZE: [45 87381]
PERIOD_BYTES: [270 524288]
PERIODS: [2 1024]
BUFFER_TIME: (468 3962858)
BUFFER_SIZE: [90 174762]
BUFFER_BYTES: [540 1048576]
TICK_TIME: ALL
error on set_format SND_PCM_FORMAT_S16
Unavailable hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S24_3LE
SUBFORMAT:  STD
SAMPLE_BITS: 24
FRAME_BITS: [48 96]
CHANNELS: [2 4]
RATE: [44100 192000]
PERIOD_TIME: [1000 1981429)
PERIOD_SIZE: [45 87381]
PERIOD_BYTES: [270 524288]
PERIODS: [2 1024]
BUFFER_TIME: (468 3962858)
BUFFER_SIZE: [90 174762]
BUFFER_BYTES: [540 1048576]
TICK_TIME: ALL
failed to configure output device...trying OSS
error opening /dev/dsp
Failed to initialize plugin!
Failed to register plugin: /usr/lib/alsaplayer/output/liboss_out.so
failed to load output plugin (alsa). exitting...

But I can play music just fine with:

$ alsaplayer -o alsa -d plughw:USB ~/Music/fun/opensource.ogg

Actually this way the music is distorted, but if I add “-F 48000” to alsaplayer, it’s OK. Where is the system-wide default device really taken from in OpenSUSE?

Check to ensure your volume is not associated with your sound device that is not in use.

I did:

$ aplay -l
...
card 3: USB [E-MU 0404 | USB], device 0: USB Audio [USB Audio]
$ alsamixer -c 3

… and it ain’t controlling the volume.

When in YaST > Hardware > Sound click Add, in the left column select Generic, in the right column there is but one choice USB Audio, so check that one and click next.

I reset /etc/modprobe.d/sound and added generic USB card. The card was added successfully, but didn’t play any sounds. So I tried adding emu10k1 as well, but this resulted an error. So I’m back on my working /etc/modprobe.d/sound :slight_smile:

PS. Another problem: I cannot record music via the USB card :frowning:

Thanks for reporting this back. Itr is good to know that not all USB sound cards are added as simple as that.

Thanks for reporting this back. Itr is good to know that not all USB sound cards are added as simple as that.

I just rechecked it and actually it works, but only the same way as I managed to do it manually - it still needs specifying the default device (with -d for alsaplayer or with my ~/.asoundrc). And I DID set it as the primary card in sound configuration.

This will not help much I am afraid because it tells a success while you have a fail (until now) :frowning:

I had a 10.0 system with two sound cards. In the beginning I had a lot of trouble configuring all sound producing programs to use the second (USB) sound card instead of the first. I did not succeed with all of them.

Then I just deleted both with YaST, and configured them again, but in reversed order. Now (after making all configuring on the sound programs undone!) everything is OK.

In 10.3 you can use the button to make it the first one. I did not use this after the upgrade to 10.3 (wich was a new install anyhow), but only configured the USB one.

So may be, when you do need only the USB one, use YaST, delete both and configure the USB one.

Hope this helps.

It’s been a while and I’ve been using my USB card with my .asoundrc specifying default device etc. I’ve now got a new PC and installed 11.1 on that, still using the same USB soundcard.

There seem to be some issues with dmix (SourceForge.net: alsa-user) so is there any way to turn it off or to specify some custom ALSA options (eg. ‘rate’) in Yast?

Hi there,
I just bought a M-Audio Fast Track Pro. I saw in the net that it could run on Linux.
After some fight with Yast it worked at last…

/etc/modules.d/sound :

options snd-usb-audio id=0x763 pid=0x2012 device_setup=0x9 index=0 enable=1 nrpacks=1
options snd slots=snd-usb-audio,snd-emu10k1
# uniq.unknown_key:USB Audio
alias snd-card-0 snd-usb-audio
# zsAr.mTanvDDnb_0:CT4832 SBLive! Value
alias snd-card-1 snd-emu10k1

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: 0x763 [FastTrack Pro], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: 0x763 [FastTrack Pro], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Live [SBLive! Value [CT4832]], device 0: emu10k1 [ADC Capture/Standard PCM Playback]

And here is the output of arecord

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: 0x763 [FastTrack Pro], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Live [SBLive! Value [CT4832]], device 0: emu10k1 [ADC Capture/Standard PCM Playback]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Live [SBLive! Value [CT4832]], device 1: emu10k1 mic [Mic Capture]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Live [SBLive! Value [CT4832]], device 2: emu10k1 efx [Multichannel Capture/PT Playback]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

But what a surprise … while amarok is playing there is no sound in FireFox.
And after while the sound was switched to SB Live! … and after while again to Pro…what the hell?

Could somebody give me some help and instructions?

I found out what the problem was :slight_smile:
I remembered that I runned a comand like:

asoundconf set-default-card Pro

And I saw a strange records in ~/.asoundrc.asoundconf, which was included in ~/.asoundrc.

So here is what I did:

I backup-ed files ~/.asoundrc and ~/.asoundrc.asoundconf , deleted the originals


rm -f  ~/.asoundrc
rm -f ~/.asoundrc.asoundconf

and everything worked out!!!

I did not tested recording yet…will post later on how i did it:-)

B.t.w. here is what I’ve got in both files"

~/.asoundrc:

# ALSA library configuration file

# Include settings that are under the control of asoundconf(1).
# (To disable these settings, comment out this line.)
</home/annipul/.asoundrc.asoundconf>

pcm.!default {
    type hw
    card 0
    device 0
}

and ~/.asoundrc.asoundconf :


# ALSA library configuration file managed by asoundconf(1).
#
# MANUAL CHANGES TO THIS FILE WILL BE OVERWRITTEN!
#
# Manual changes to the ALSA library configuration should be implemented
# by editing the ~/.asoundrc file, not by editing this file.
!defaults.pcm.card 0x763
defaults.ctl.card 0x763
defaults.pcm.device 0
defaults.pcm.subdevice -1
defaults.pcm.nonblock 1
defaults.pcm.ipc_key 5678293
defaults.pcm.ipc_gid audio
defaults.pcm.ipc_perm 0660
defaults.pcm.dmix_max_periods 0
defaults.pcm.dmix_rate 48000
defaults.pcm.dmix_format S16
defaults.pcm.front.card defaults.pcm.card
defaults.pcm.front.device defaults.pcm.device
defaults.pcm.rear.card defaults.pcm.card
defaults.pcm.rear.device defaults.pcm.device
defaults.pcm.center_lfe.card defaults.pcm.card
defaults.pcm.center_lfe.device defaults.pcm.device
defaults.pcm.side.card defaults.pcm.card
defaults.pcm.side.device defaults.pcm.device
defaults.pcm.surround40.card defaults.pcm.card
defaults.pcm.surround40.device defaults.pcm.device
defaults.pcm.surround41.card defaults.pcm.card
defaults.pcm.surround41.device defaults.pcm.device
defaults.pcm.surround50.card defaults.pcm.card
defaults.pcm.surround50.device defaults.pcm.device
defaults.pcm.surround51.card defaults.pcm.card
defaults.pcm.surround51.device defaults.pcm.device
defaults.pcm.surround71.card defaults.pcm.card
defaults.pcm.surround71.device defaults.pcm.device
defaults.pcm.iec958.card defaults.pcm.card
defaults.pcm.iec958.device defaults.pcm.device
defaults.pcm.modem.card defaults.pcm.card
defaults.pcm.modem.device defaults.pcm.device
defaults.rawmidi.card 0
defaults.rawmidi.device 0
defaults.rawmidi.subdevice -1
defaults.hwdep.card 0
defaults.hwdep.device 0
defaults.timer.class 2
defaults.timer.sclass 0
defaults.timer.card 0
defaults.timer.device 0
defaults.timer.subdevice 0

Hello.

Do you have simultaneous sounds (ie. dmix, I guess) working with this configuration? Because as I see it you use hw directly (through your ~/.asoundrc.

If I try using these configurations .asoundrc and .asoundrc.asoundconf (replacing ‘0x763’ with ‘USB’), I can’t get any sound at all :frowning:

And I don’t get it why do I have 2 USB devices:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: USB [E-MU 0404 | USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: USB [E-MU 0404 | USB], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Thank you so much! I have a m-audio fast track ultra 8r sound card. I tried to install it three hole days. I could not find a simple solution at any web page. But with this my card and all eight sound speakers are working. It is like you said. Thanks man, I have my music back. -Christian

https://forums.opensuse.org/images/icons/icon14.png It is working for m-Audio fast track ultra 8r

Thank you so much! I have a m-audio fast track ultra 8r sound card and open suse linux. I tried to install it three hole days. I could not find a simple solution at any web page. But with this my card and all eight sound speakers are working. It is like you said. Thanks man, I have my music back. -Christian