diff options
Diffstat (limited to 'include/sound/ak4xxx-adda.h')
-rw-r--r-- | include/sound/ak4xxx-adda.h | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/include/sound/ak4xxx-adda.h b/include/sound/ak4xxx-adda.h index 3d9888492026..d0deca669b92 100644 --- a/include/sound/ak4xxx-adda.h +++ b/include/sound/ak4xxx-adda.h | |||
@@ -39,26 +39,39 @@ struct snd_ak4xxx_ops { | |||
39 | 39 | ||
40 | #define AK4XXX_IMAGE_SIZE (AK4XXX_MAX_CHIPS * 16) /* 64 bytes */ | 40 | #define AK4XXX_IMAGE_SIZE (AK4XXX_MAX_CHIPS * 16) /* 64 bytes */ |
41 | 41 | ||
42 | /* DAC label and channels */ | ||
43 | struct snd_akm4xxx_dac_channel { | ||
44 | char *name; /* mixer volume name */ | ||
45 | unsigned int num_channels; | ||
46 | }; | ||
47 | |||
48 | /* ADC labels and channels */ | ||
49 | struct snd_akm4xxx_adc_channel { | ||
50 | char *name; /* capture gain volume label */ | ||
51 | char *switch_name; /* capture switch */ | ||
52 | unsigned int num_channels; | ||
53 | }; | ||
54 | |||
42 | struct snd_akm4xxx { | 55 | struct snd_akm4xxx { |
43 | struct snd_card *card; | 56 | struct snd_card *card; |
44 | unsigned int num_adcs; /* AK4524 or AK4528 ADCs */ | 57 | unsigned int num_adcs; /* AK4524 or AK4528 ADCs */ |
45 | unsigned int num_dacs; /* AK4524 or AK4528 DACs */ | 58 | unsigned int num_dacs; /* AK4524 or AK4528 DACs */ |
46 | unsigned char images[AK4XXX_IMAGE_SIZE]; /* saved register image */ | 59 | unsigned char images[AK4XXX_IMAGE_SIZE]; /* saved register image */ |
47 | unsigned char ipga_gain[AK4XXX_MAX_CHIPS][2]; /* saved register image | 60 | unsigned char volumes[AK4XXX_IMAGE_SIZE]; /* saved volume values */ |
48 | * for IPGA (AK4528) | ||
49 | */ | ||
50 | unsigned long private_value[AK4XXX_MAX_CHIPS]; /* helper for driver */ | 61 | unsigned long private_value[AK4XXX_MAX_CHIPS]; /* helper for driver */ |
51 | void *private_data[AK4XXX_MAX_CHIPS]; /* helper for driver */ | 62 | void *private_data[AK4XXX_MAX_CHIPS]; /* helper for driver */ |
52 | /* template should fill the following fields */ | 63 | /* template should fill the following fields */ |
53 | unsigned int idx_offset; /* control index offset */ | 64 | unsigned int idx_offset; /* control index offset */ |
54 | enum { | 65 | enum { |
55 | SND_AK4524, SND_AK4528, SND_AK4529, | 66 | SND_AK4524, SND_AK4528, SND_AK4529, |
56 | SND_AK4355, SND_AK4358, SND_AK4381 | 67 | SND_AK4355, SND_AK4358, SND_AK4381, |
68 | SND_AK5365 | ||
57 | } type; | 69 | } type; |
58 | unsigned int *num_stereo; /* array of combined counts | 70 | |
59 | * for the mixer | 71 | /* (array) information of combined codecs */ |
60 | */ | 72 | struct snd_akm4xxx_dac_channel *dac_info; |
61 | char **channel_names; /* array of mixer channel names */ | 73 | struct snd_akm4xxx_adc_channel *adc_info; |
74 | |||
62 | struct snd_ak4xxx_ops ops; | 75 | struct snd_ak4xxx_ops ops; |
63 | }; | 76 | }; |
64 | 77 | ||
@@ -72,9 +85,9 @@ int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak); | |||
72 | (ak)->images[(chip) * 16 + (reg)] | 85 | (ak)->images[(chip) * 16 + (reg)] |
73 | #define snd_akm4xxx_set(ak,chip,reg,val) \ | 86 | #define snd_akm4xxx_set(ak,chip,reg,val) \ |
74 | ((ak)->images[(chip) * 16 + (reg)] = (val)) | 87 | ((ak)->images[(chip) * 16 + (reg)] = (val)) |
75 | #define snd_akm4xxx_get_ipga(ak,chip,reg) \ | 88 | #define snd_akm4xxx_get_vol(ak,chip,reg) \ |
76 | (ak)->ipga_gain[chip][(reg)-4] | 89 | (ak)->volumes[(chip) * 16 + (reg)] |
77 | #define snd_akm4xxx_set_ipga(ak,chip,reg,val) \ | 90 | #define snd_akm4xxx_set_vol(ak,chip,reg,val) \ |
78 | ((ak)->ipga_gain[chip][(reg)-4] = (val)) | 91 | ((ak)->volumes[(chip) * 16 + (reg)] = (val)) |
79 | 92 | ||
80 | #endif /* __SOUND_AK4XXX_ADDA_H */ | 93 | #endif /* __SOUND_AK4XXX_ADDA_H */ |