AD1848: Make CD audio input designated per-card

Fixes CD audio mixer not working for GUS MAX
This commit is contained in:
Alexander Babikov
2025-09-11 16:47:56 +05:00
parent cb96d4e1bc
commit a59eb526ed
6 changed files with 41 additions and 11 deletions

View File

@@ -32,6 +32,14 @@ enum {
AD1848_TYPE_CS4235 = 6
};
enum {
AD1848_AUX1 = 2,
AD1848_AUX2 = 4,
AD1848_OUT = 6,
AD1848_LINE_IN = 18,
AD1848_MONO = 26
};
typedef struct ad1848_t {
uint8_t type;
uint8_t index;
@@ -47,6 +55,7 @@ typedef struct ad1848_t {
int16_t out_l;
int16_t out_r;
int8_t cd_vol_reg;
double cd_vol_l;
double cd_vol_r;
int fm_vol_l;
@@ -86,6 +95,7 @@ extern void ad1848_write(uint16_t addr, uint8_t val, void *priv);
extern void ad1848_update(ad1848_t *ad1848);
extern void ad1848_speed_changed(ad1848_t *ad1848);
extern void ad1848_set_cd_audio_channel(void *priv, int channel);
extern void ad1848_filter_cd_audio(int channel, double *buffer, void *priv);
extern void ad1848_filter_aux2(void* priv, double* out_l, double* out_r);