Port-hpcsh archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Sound again



Hello :)

I've started developing my own sound driver for Jornada 6x0 and some 
things are not clear.

1. Microphone. How is it wired? I've tried reading from ADC channel 
0 and even read some noise, but it doesn't seem to be corelated with 
sound. Is there any GPIO pin that I have to toggle to turn the mic 
on, or is it just other ADC channel?

2. autoconf(9). I'm writing this driver as an LKM (at least for now, 
to ease debugging) and after reading lkm/net/tap/if_tap_lkm.c messed 
with config_cfdriver_attach(), config_cfdriver_detach() and similar 
for config_cfattach, but my probe, attach and detach functions are 
never called. Is there something special that I should be aware of? 
My declarations:

CFDRIVER_DECL(jsnd, DV_DULL, NULL);
CFATTACH_DECL(jsnd, sizeof(struct jsnd_softc), jsnd_match, jsnd_attach, 
jsnd_detach, NULL);

2. callouts. I use:

callout_reset(&jsnd_ch, hz / JSND_FREQ, jsnd_callout_fn, NULL);

When I define JSND_FREQ as for example 10, it works okay, but after 
defining it as 100 and above, modload complains:

jsnd.o: file not recognized: File format not recognized
modload: can't prelink `jsnd.o' creating `jsnd'

Eventually I'd like to define it as 8000, is there a chance that the 
callout handler will be called at this frequency?

Sorry for maybe naive questions, but this is my first NetBSD driver.

Regards,

-- 
[ Adam Wysocki, www.chmurka.net, GSM: +48 514 710 213 ]
[ Software Development Department, ArcaBit Sp. z o.o. ]
[ Ul. Fortuny 9 :: 01-339 Warszawa :: www.arcabit.com ]



Home | Main Index | Thread Index | Old Index