Some AD1848 cleanups I forgot
This commit is contained in:
@@ -25,31 +25,21 @@
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int index;
|
int index;
|
||||||
uint8_t regs[32]; /* 16 original + 16 CS4231A extensions */
|
uint8_t regs[32], status; /* 16 original registers + 16 CS4231A extensions */
|
||||||
uint8_t status;
|
|
||||||
|
|
||||||
int trd;
|
int trd, mce, count;
|
||||||
int mce;
|
|
||||||
|
|
||||||
int count;
|
|
||||||
|
|
||||||
int16_t out_l, out_r;
|
int16_t out_l, out_r;
|
||||||
|
|
||||||
double cd_vol_l, cd_vol_r;
|
double cd_vol_l, cd_vol_r;
|
||||||
|
|
||||||
int enable;
|
int enable, irq, dma, freq;
|
||||||
|
|
||||||
int irq, dma;
|
|
||||||
|
|
||||||
int freq;
|
|
||||||
|
|
||||||
pc_timer_t timer_count;
|
pc_timer_t timer_count;
|
||||||
uint64_t timer_latch;
|
uint64_t timer_latch;
|
||||||
|
|
||||||
int16_t buffer[SOUNDBUFLEN * 2];
|
int16_t buffer[SOUNDBUFLEN * 2];
|
||||||
int pos;
|
int pos, type;
|
||||||
|
|
||||||
int type;
|
|
||||||
} ad1848_t;
|
} ad1848_t;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ ad1848_write(uint16_t addr, uint8_t val, void *priv)
|
|||||||
case 7: freq /= 2560; break;
|
case 7: freq /= 2560; break;
|
||||||
}
|
}
|
||||||
ad1848->freq = freq;
|
ad1848->freq = freq;
|
||||||
ad1848->timer_latch = (uint64_t)((double)TIMER_USEC * (1000000.0 / (double)ad1848->freq));
|
ad1848->timer_latch = (uint64_t) ((double) TIMER_USEC * (1000000.0 / (double) ad1848->freq));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 9:
|
case 9:
|
||||||
|
|||||||
Reference in New Issue
Block a user