Generating a simple sound (f.e. "beep") in a LKM - 2.2.12

Generating a simple sound (f.e. "beep") in a LKM - 2.2.12

Post by Klaus Müll » Mon, 27 May 2002 03:56:55



Hello everybody,
my question is the following one :
How can I generate a sound (f.e. a "beep") using a LKM ?
I checked console.c , but kd_mksound does not work properly or I was too stupid.
I hope you understand my question ..

So long
-Socma-

thanx in advance

 
 
 

Generating a simple sound (f.e. "beep") in a LKM - 2.2.12

Post by Kevin Buh » Mon, 27 May 2002 09:05:55



> How can I generate a sound (f.e. a "beep") using a LKM ?
> I checked console.c , but kd_mksound does not work properly

Well, it *must* work.  Otherwise, the console wouldn't beep, right? ;)

You didn't say what problem you ran into.  When I tried to write a
beeping module, I found that "kd_mksound" was only exported in a few
architectures ("arm" and "ppc" for some reason), so I had to make a
copy of the code in my own module before my module would beep.

Is this the problem you had, or was it something else?

--


 
 
 

Generating a simple sound (f.e. "beep") in a LKM - 2.2.12

Post by Klaus Müll » Mon, 27 May 2002 17:03:35


Quote:> Well, it *must* work.  Otherwise, the console wouldn't beep, right? ;)

> You didn't say what problem you ran into.  When I tried to write a
> beeping module, I found that "kd_mksound" was only exported in a few
> architectures ("arm" and "ppc" for some reason), so I had to make a
> copy of the code in my own module before my module would beep.

> Is this the problem you had, or was it something else?

First of all, thanks for the answer.
I searched for kd_mksound, copied the macros which were used by it,
included the necessary include-files and then I used it in my own
module. When I insmoded it , it just generates an "Segmentation
fault"....

kd_mksound is "defined" in  /usr/src/linux/drivers/char/vt.c right ?
I will try it again, I know that it has to work ;)

I will work out a new code, then paste it here, if it doesn't work all
right, otherwise I would post it anyway .

till then
-Socma-

 
 
 

Generating a simple sound (f.e. "beep") in a LKM - 2.2.12

Post by Klaus Müll » Mon, 27 May 2002 20:14:15




> > How can I generate a sound (f.e. a "beep") using a LKM ?
> > I checked console.c , but kd_mksound does not work properly

> Well, it *must* work.  Otherwise, the console wouldn't beep, right? ;)

> You didn't say what problem you ran into.  When I tried to write a
> beeping module, I found that "kd_mksound" was only exported in a few
> architectures ("arm" and "ppc" for some reason), so I had to make a
> copy of the code in my own module before my module would beep.

> Is this the problem you had, or was it something else?

arg, i defined kd_mksound as void _kd_mksound (like in vt.c), but in
my lkm later I called kd_mksound, therefore he generated a
Segmentation fault, replacing this by a _kd_mksound was enough to
solve the problem.

sometimes , the small things create a great chaos ;)

nevertheless, thank you

 
 
 

1. kernel 2.2.12 and "fixincludes" on the header files

I've just done some major upgrading: kernel 1.2.13 to 2.2.12 and
libc5.0.9 to glibc2.0.6.  I'm trying to get a good idea of what modifies
what during upgrades of this triad of kernel, libc, and gcc--learning
the hard way, of course.  As far as I can tell, the only impact gcc has
during installation is to fix certain kernel header files, referred to
as "fixincludes".  I've created separate versions of /usr/include for
several permutations of libc5-kernel-1.2.13, libc5-kernel-2.2.12,
libc6-kernel-2.2.12, etc, to make sure I have backward compatibility.
Trouble is, the last step is probably to re-install gcc-2.7.2 to make
sure the kernel-2.2.12 header files are gcc-compliant.  But I don't want
to go through the trouble of re-installing gcc every time I upgrade my
kernel.  Is there a shortcut to the "fixincludes" operation without
having to go through a total re-install of gcc?

Al Steffens

2. Samba File Permissions

3. 2.2.12 with SMP confuses "ps"?

4. 2.4 lseek usage cleanup, take two

5. access "/dev/mem" in 2.2.12 kernel

6. Tomcat 3.3/4.01 latest versions - how to install/configure

7. Type "(", ")" and "{", "}" in X...

8. FTP daemon problem

9. Programmin Prob: compare time_t with f.e. "05.05.1996"

10. GETSERVBYNAME()????????????????????"""""""""""""

11. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

12. OPTi 16 Sound Card Configuration under RH5.2 & kernel 2.2.12

13. Linux 2.2.12 with ASUS P5A motherboard onchip sound