Dummy Soundcard for Amazon linux server

Viewed 876

I need to use an application which needs a soundcard in an amazon ec2 instance with the default ubuntu 16.04 installed on it. Problem is that there's no soundcard available. I've tried everything on google on how to create a dummy soundcard so the program runs with no problem, but nothing helped because it was outdated. This is what lspcireturns:

00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)

lsmod | grep snd does not return ANYTHING which makes me think that I might me missing all modules, and not just snd-dummy.

I've been trying to setup a dummy by using the command sudo modprobe snd-dummy which returns the following error:

modprobe: FATAL: Module snd-dummy not found in directory /lib/modules/4.4.0-1013-aws

Any clues?

1 Answers

If anyone still has the same issue:

You are probably using an AMI that comes with a kernel compiled without the snd-dummy module. The ALSA wiki suggests building this modules from source (alsa-driver) but this is out of date.

I was able to run an application that needs a soundcard on EC2 by installing pulseaudio

sudo apt install pulseaudio
pulseaudio --start

After which I get:

$ aplay test.wav 
Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 22257 Hz, Mono

And the soundcard-needing application runs normally. If this is not enough for you, you might need to enable the default sink:

pactl load-module module-null-sink sink_name=auto_null
pactl set-default-sink auto_null

More details here Linux application fails with "Invalid CTL" and "Unknown PCM"

Related