Subject: Re: Sound again
To: None <>
From: Valeriy E. Ushakov <>
List: port-hpcsh
Date: 09/20/2006 05:22:37
On Thu, Sep 14, 2006 at 17:53:21 +0200, Adam Wysocki via ArcaBit wrote:

> 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?

I think mic-enable is on some pin (in either PFC or GPIO), but I
didn't explore it at all.

> 2. autoconf(9). I'm writing this driver as an LKM (at least for now, 

I never really tested LKM's on sh3.

> 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'

Ah, new binutisl rototilled the way sh3 flags are set in the ELF
header and I don't think the rest of the system has been taught the
new flags.

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

No :)

You need to use some timer as an interrupt source.  TMUs are all
taken, so you will have to use one of HD64461 timers.  (When I played
with it I just abused the watchdog timer :)

SY, Uwe
--                         |       Zu Grunde kommen          |       Ist zu Grunde gehen