From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dominique Michel Subject: Re: can dosemu use this sound card? Date: Wed, 28 Apr 2021 11:29:04 +0200 Message-ID: <20210428112904.2e2938ee@tux> References: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=T7mwsqRPc+0L9P/GsUY9BI9lbJ6saJ2CswxoxzwQRfc=; b=PCo/BLUafUw3fUvmEqasw2gGx/qr8n9WvRWsQqM7xdvGeKqzHnY3MSf1o2TXcrEVBW LuUKiS/2NMc8VOMvhwGOeei/nw9+7wo2uvwzlcTCVLmu9xiYkq19VYWr4bteaK7pj4G7 DHMzDuoyKvy4UAidcjbayT4s3EiDgr3A+Qzeb1+fMFzkmKVTRCPLPfX0AuD24GMLpE7e Ue12tM2wqlbs4Dhfx+sUI8JuLvjQeHj4hdmmMBp4wLg7niC/fNZ2b9O6WSMRw6oeJjq7 wy1wLTtf84D5eILnjaEz2A+tH7LqqnuOwXuMQg+gI+6Ci4on29OZ11XQFXjT1qbK6EYv yLoA== In-Reply-To: List-ID: Content-Type: text/plain; charset="iso-8859-1" To: Julius Schwartzenberg Cc: Jude DaShiell , linux-msdos@vger.kernel.org Le Tue, 27 Apr 2021 22:32:57 +0200, Julius Schwartzenberg a =C3=A9crit : > I don't think the type of card matters as long as you have a single=20 > 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=3D0 model=3Dalc271-dmic options snd-virmidi index=3D1 # 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=3D2 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. >=20 > 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? > >=20