ALSA: oxygen: simplify model-specific MCLK handling
Replace the get_i2s_mclk callback with tables of MCLK values. This simplifies the MCLK-handling code in both the framework and the model- specific drivers. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

committato da
Takashi Iwai

parent
bc29e262c3
commit
5b8bf2a54f
@@ -16,6 +16,10 @@
|
||||
#define PCM_AC97 5
|
||||
#define PCM_COUNT 6
|
||||
|
||||
#define OXYGEN_MCLKS(f_single, f_double, f_quad) ((MCLK_##f_single << 0) | \
|
||||
(MCLK_##f_double << 2) | \
|
||||
(MCLK_##f_quad << 4))
|
||||
|
||||
#define OXYGEN_IO_SIZE 0x100
|
||||
|
||||
#define OXYGEN_EEPROM_ID 0x434d /* "CM" */
|
||||
@@ -81,8 +85,6 @@ struct oxygen_model {
|
||||
void (*resume)(struct oxygen *chip);
|
||||
void (*pcm_hardware_filter)(unsigned int channel,
|
||||
struct snd_pcm_hardware *hardware);
|
||||
unsigned int (*get_i2s_mclk)(struct oxygen *chip, unsigned int channel,
|
||||
struct snd_pcm_hw_params *hw_params);
|
||||
void (*set_dac_params)(struct oxygen *chip,
|
||||
struct snd_pcm_hw_params *params);
|
||||
void (*set_adc_params)(struct oxygen *chip,
|
||||
@@ -105,6 +107,8 @@ struct oxygen_model {
|
||||
u8 dac_volume_max;
|
||||
u8 misc_flags;
|
||||
u8 function_flags;
|
||||
u8 dac_mclks;
|
||||
u8 adc_mclks;
|
||||
u16 dac_i2s_format;
|
||||
u16 adc_i2s_format;
|
||||
};
|
||||
@@ -171,8 +175,6 @@ void oxygen_update_spdif_source(struct oxygen *chip);
|
||||
/* oxygen_pcm.c */
|
||||
|
||||
int oxygen_pcm_init(struct oxygen *chip);
|
||||
unsigned int oxygen_default_i2s_mclk(struct oxygen *chip, unsigned int channel,
|
||||
struct snd_pcm_hw_params *hw_params);
|
||||
|
||||
/* oxygen_io.c */
|
||||
|
||||
|
Fai riferimento in un nuovo problema
Block a user