Re: can dosemu use this sound card?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le Tue, 27 Apr 2021 22:32:57 +0200,
Julius Schwartzenberg <julius.schwartzenberg@xxxxxxxxx> a écrit :

> I don't think the type of card matters as long as you have a single 
> device, but using a non-default device might require that you switch
> the output device through pulseaudio or possibly you can instruct SDL
> to use another device.

The default audio kernel driver on linux is ALSA. You can define the
sound cards number and order in /etc/modprobe.d/alsa.conf and
~/.asoundrc to set the default sound card. ~/.asoundrc can be modified
on the fly, at least for ALSA. I have no idea if pulseaudio will like
it as I don't use it but prefer JACK. To set the card order is
important especially with usb cards, that because they can or not be
present at boot time and no guaranty can be made if that order is not
specified.

alsa.conf:
# Alsa kernel modules' configuration file.
# ALSA portion
alias char-major-116 snd
# OSS/Free portion
# On most system, the OSS sections could be removed, but if these
# modules are installed, it doesn't arm.
alias char-major-14 soundcore
# You need to customise this section for your specific sound card(s)
# and then run `update-modules' command. Not sure if it is still
necessary.
#  ALSA portion
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-virmidi
#  OSS/Free portion
alias sound-slot-0 snd-hda-intel
alias sound-slot-1 snd-virmidi
# cards order and options, index start at 0
options snd-hda-intel index=0 model=alc271-dmic
options snd-virmidi index=1
# OSS/Free portion - card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
##  OSS/Free portion - card #2
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-12 snd-pcm-oss
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss

# Set this to the physical number of cards.
options snd cards_limit=2


In ~/.asoundrc, you will have to configure pcm.!default used by ALSA to
the card you want to use. Mine use the pcm jack ALSA plugin, that in
order to route the audio from the ALSA only applications to jack. Yours
will be simpler (see the ALSA driver documentation):

# default ALSA card
pcm.!default {
    type plug
    slave { pcm "jack" }
}

# card 0 is snd-aloop
pcm.jack {
    type jack
    playback_ports {
        0 system:playback_1
        1 system:playback_2
    }
    capture_ports {
        0 system:capture_1
        1 system:capture_2
    }
}

# define a mixer volume for that card
ctl.mixer0 {
    type hw
    card 0
}

Or you can define the USB card as card 0 in /etc/modprobe.d/alsa.conf
and remove ~/.asoundrc.

When done and if using pulse, you may or not need to restart it
and/or adjust its configuration.

> 
> Op 26-04-2021 om 02:34 schreef Jude DaShiell:
> > A run of lsusb on Linux got this line back for the sound card I'm
> > using. Bus 004 Device 002: ID 0d8c:0001 C-Media Electronics, Inc.
> > Audio Device Can dosemu be configured to use that sound card?
> > 




[Index of Archives]     [Linux Console]     [Linux Audio]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Camping]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Samba]     [Linux Media]     [Fedora Users]

  Powered by Linux