Rev 1028 | Rev 1695 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1028 | Rev 1029 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | 7 | ||
8 | #include "geode.h" |
8 | #include "geode.h" |
Line 9... | Line 9... | ||
9 | 9 | ||
Line -... | Line 10... | ||
- | 10 | #define DEBUG |
|
- | 11 | ||
10 | #ifdef DEBUG |
12 | #ifdef DEBUG |
11 | #define DBG(format,...) dbgprintf(format,##__VA_ARGS__) |
13 | #define DBG(format,...) dbgprintf(format,##__VA_ARGS__) |
12 | #else |
14 | #else |
13 | #define DBG(format,...) |
15 | #define DBG(format,...) |
14 | #endif |
16 | #endif |
Line 306... | Line 308... | ||
306 | return FALSE; |
308 | return FALSE; |
307 | } |
309 | } |
308 | 310 | ||
309 | /*Check which codec is being used */ |
311 | u16_t id7c, id7e; |
Line -... | Line 312... | ||
- | 312 | ||
- | 313 | id7c = snd_hw_CodecRead(AD1819A_VENDORID1); |
|
- | 314 | id7e = snd_hw_CodecRead(AD1819A_VENDORID2); |
|
- | 315 | ||
- | 316 | dbgprintf("codec id 0x7C %x 0x7E %x\n", id7c, id7e); |
|
- | 317 | ||
- | 318 | /*Check which codec is being used */ |
|
310 | if (snd_hw_CodecRead(AD1819A_VENDORID1) == 0x4144 && |
319 | if ( (id7c == 0x4144) && |
311 | snd_hw_CodecRead(AD1819A_VENDORID2) == 0x5303) |
320 | (id7e == 0x5303) ) |
312 | { |
321 | { |
313 | geode.fAD1819A = TRUE; |
322 | geode.fAD1819A = TRUE; |
314 | /* Enable non-48kHz sample rates. */ |
323 | /* Enable non-48kHz sample rates. */ |
315 | snd_hw_CodecWrite (AD1819A_SER_CONF, |
324 | snd_hw_CodecWrite (AD1819A_SER_CONF, |
316 | snd_hw_CodecRead(AD1819A_SER_CONF>>8) | |
325 | snd_hw_CodecRead(AD1819A_SER_CONF>>8) | |
317 | AD1819A_SER_CONF_DRQEN); |
326 | AD1819A_SER_CONF_DRQEN); |
Line 326... | Line 335... | ||
326 | } |
335 | } |
327 | 336 | ||
328 | /* set default volume*/ |
337 | /* set default volume*/ |
Line 329... | Line 338... | ||
329 | snd_hw_CodecWrite( MASTER_VOLUME, 0x0B0B); |
338 | snd_hw_CodecWrite( MASTER_VOLUME, 0x0909); |
330 | snd_hw_CodecWrite( PCM_OUT_VOL, 0x0808); |
339 | snd_hw_CodecWrite( PCM_OUT_VOL, 0x0606); |
331 | snd_hw_CodecWrite( PC_BEEP_VOLUME, 0x0000); |
340 | snd_hw_CodecWrite( PC_BEEP_VOLUME, 0x0000); |
332 | snd_hw_CodecWrite( PHONE_VOLUME, 0x8000); |
341 | snd_hw_CodecWrite( PHONE_VOLUME, 0x0606); |
333 | snd_hw_CodecWrite( MIC_VOLUME, 0x8048); |
342 | snd_hw_CodecWrite( MIC_VOLUME, 0x8048); |
334 | snd_hw_CodecWrite( LINE_IN_VOLUME, 0x0808); |
343 | snd_hw_CodecWrite( LINE_IN_VOLUME, 0x0808); |
335 | snd_hw_CodecWrite( CD_VOLUME, 0x8000); |
344 | snd_hw_CodecWrite( CD_VOLUME, 0x8000); |
336 | snd_hw_CodecWrite( VIDEO_VOLUME, 0x8000); |
345 | snd_hw_CodecWrite( VIDEO_VOLUME, 0x8000); |
337 | snd_hw_CodecWrite( TV_VOLUME, 0x8000); |
346 | snd_hw_CodecWrite( TV_VOLUME, 0x8000); |
338 | snd_hw_CodecWrite( RECORD_SELECT, 0x0000); |
347 | snd_hw_CodecWrite( RECORD_SELECT, 0x0000); |