Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: configuring USB sound card from Yast

  1. #1
    Join Date
    Jul 2008
    Location
    Estonia
    Posts
    100

    Exclamation 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:
    Code:
    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:
    Code:
    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?

  2. #2
    Join Date
    Mar 2008
    Location
    Phuket, Thailand
    Posts
    27,109
    Blog Entries
    40

    Default Re: configuring USB sound card from Yast

    Quote Originally Posted by atroxix View Post
    I can't play multiple sounds simultaneously
    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.

    Quote Originally Posted by atroxix View Post
    changing volume from alsamix doesn't work
    Check to ensure your volume is not associated with your sound device that is not in use.

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,814

    Default Re: configuring USB sound card from Yast

    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.
    Henk van Velden

  4. #4
    Join Date
    Jul 2008
    Location
    Estonia
    Posts
    100

    Default Re: configuring USB sound card from Yast

    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:
    Code:
    $ 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:
    Code:
    $ 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:
    Code:
    $ 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

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

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,814

    Default Re: configuring USB sound card from Yast

    Quote Originally Posted by atroxix View Post
    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
    Thanks for reporting this back. Itr is good to know that not all USB sound cards are added as simple as that.
    Henk van Velden

  6. #6
    Join Date
    Jul 2008
    Location
    Estonia
    Posts
    100

    Default Re: configuring USB sound card from Yast

    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.

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,814

    Default Re: configuring USB sound card from Yast

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

    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.
    Henk van Velden

  8. #8
    Join Date
    Jul 2008
    Location
    Estonia
    Posts
    100

    Default Re: configuring USB sound card from Yast

    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?

  9. #9
    ssabchew NNTP User

    Default Re: configuring USB sound card from 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 :

    Code:
    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
    Code:
    $ 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
    Code:
    $ 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?

  10. #10
    ssabchew NNTP User

    Default Re: configuring USB sound card from Yast

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

    Code:
    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
    Code:
    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:

    Code:
    # 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 :

    Code:
    # 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

Page 1 of 2 12 LastLast

Posting Permissions

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