"Where's the Beep?" (PCMCIA/vt_ioctl-s)
On my old DELL LM laptop the -2.5 series no longer issues any beeps when a card is inserted. The problem is in the kernel, as the test program below (extracted from cardmgr) beeps on -2.4, but not on -2.5.
===========================================================
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>
#define BEEP_TIME 150
#define BEEP_OK 1000
#define BEEP_WARN 2000
#define BEEP_ERR 4000
#include <sys/kd.h>
static void beep(unsigned int, unsigned int);
intmain(int argc, char **argv)
{
beep(500, 1000);
beep(500, 2000);
beep(500, 4000);
return 0;
}static
void beep(unsigned int ms, unsigned int freq)
{
int fd, arg;
fd = open("/dev/tty0", O_RDWR);
if (fd < 0)
return;
arg = (ms << 16) | freq;
ioctl(fd, KDMKTONE, arg);
close(fd);
usleep(ms*1000);
}===========================================================
Signature · 1 line
B. D. Elliott [email protected]
Quoted 3 lines · On Tuesday July 15, [email protected] wrote:
On my old DELL LM laptop the -2.5 series no longer issues any beeps when a card is inserted. The problem is in the kernel, as the test program below (extracted from cardmgr) beeps on -2.4, but not on -2.5.
CONFIG_INPUT_PCSPKR
needs to be =y or =m and the module loaded.
NeilBrown
Quoted 8 lines · Neil Brown
Quoted 3 lines · On Tuesday July 15, [email protected] wrote:
On my old DELL LM laptop the -2.5 series no longer issues any beeps when a card is inserted. The problem is in the kernel, as the test program below (extracted from cardmgr) beeps on -2.4, but not on -2.5.
CONFIG_INPUT_PCSPKRneeds to be =y or =m and the module loaded.
Argh. Is *THAT* what it was?? ;)
Will those keeping the "How-to 2.6" documents please put this one in there, near the description of CONFIG_VT_CONSOLE and friends? ;)
Quoted 8 lines · Neil Brown
Quoted 3 lines · On Tuesday July 15, [email protected] wrote:
On my old DELL LM laptop the -2.5 series no longer issues any beeps when a card is inserted. The problem is in the kernel, as the test program below (extracted from cardmgr) beeps on -2.4, but not on -2.5.
CONFIG_INPUT_PCSPKRneeds to be =y or =m and the module loaded.
Double ARGH. Now I know *why* I didn't have it.
You also need CONFIG_INPUT_MISC in order to be able to *SEE* this option in menuconfig.