path for mic
Malcolm
malcolm.parsons at gmail.com
Thu Mar 29 15:02:35 CEST 2007
On 3/29/07, loux.thefuture <loux.thefuture at gmail.com> wrote:
> please find attached the patch for mic
Getting better
Index: linux-2.6.x/sound/arm/nds-sound.c
===================================================================
--- linux-2.6.x/sound/arm/nds-sound.c (rÃ(c)vision 1696)
+++ linux-2.6.x/sound/arm/nds-sound.c (copie de travail)
@@ -164,6 +164,7 @@
snd_pcm_runtime_t *runtime = substream->runtime;
runtime->hw = snd_nds_capture_hw;
// more hardware-initialization will be done here
+ nds_fifo_send(FIFO_MIC | FIFO_MIC_POWER | 1);
return 0;
}
Need a few more changes here.
+#define TIMER_ENABLE (1<<7)
+#define TIMER_DIV_1 (0)
Are these in arm7.h?
+void StartRecording(u8* buffer, int length) {
Rename MIC_Start.
FIFO commands will send buffer and length separately, so split into 3 functions.
I think ALSA expects the hardware to loop back to the start of the
buffer when it
reaches the end.
+ // Setup a 16kHz timer
+ REG_TM0CNT_L = 0xF7CF;
Replace magic number with a calculation.
+int StopRecording(void ) {
Rename MIC_Stop
+void ProcessMicrophoneTimerIRQ(void ) {
Rename MIC_IRQ.
+ *microphone_buffer++ = MIC_ReadData() ^ 0x80;
How about
microphone_buffer[current_length++] = MIC_ReadData() ^ 0x80;
--
Malcolm Parsons
More information about the dslinux-devel
mailing list