3

What is the difference between these two modules

  • pcspkr: PC-Speaker driver
  • snd_pcsp: PC-Speaker driver

different tutorials call for different ones

2
4

pcspkr is the standard module; it allows you to control the PC speaker via the input layer. The canonical symlink is /dev/input/by-path/platform-pcspkr-event-spkr. You can send events to the speaker by writing to it (most other input devices will produce events, which you read from the input device node). The PC speaker is very simple, basically it can play tones of a given frequency, which can be used for beeps with different pitches.

snd_pcsp is an attempt to the use this very limited hardware to produce full PCM sound. It appears as an ALSA device. It doesn't work very well, at least on my system; the sound is barely recognizable. I'd by surprised if a "tutorial calls for it".

1
  • If the question is "how do I get virtualbox to simulate a PC speaker" (which you didn't mention at all in the question above, might be a good idea to do it next time): As you've already heard, either enable virtualbox to directly access the speaker hardware via passthrough, or use whatever options virtualbox has to emulate a speaker. (I haven't tried either). Read virtualbox docs for details. If virtualbox doesn't emulate enough for you, try QEMU. Linux modules on the host side have nothing to do with this.
    – dirkt
    Jun 7 '18 at 4:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.