diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2011-01-10 16:14:52 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-01-10 16:46:31 +0100 |
commit | 5b8bf2a54fb13e40519ee846ce27bc8a2d7a7878 (patch) | |
tree | 2aa57e62574054f6f9d5d8bf5eb55c72c227e787 /sound/pci/oxygen/oxygen_regs.h | |
parent | bc29e262c3062682c6099bd455ae8544916f723e (diff) |
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>
Diffstat (limited to 'sound/pci/oxygen/oxygen_regs.h')
-rw-r--r-- | sound/pci/oxygen/oxygen_regs.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/oxygen/oxygen_regs.h b/sound/pci/oxygen/oxygen_regs.h index 331d3d96fa2..63dc7a0ab55 100644 --- a/sound/pci/oxygen/oxygen_regs.h +++ b/sound/pci/oxygen/oxygen_regs.h @@ -139,9 +139,11 @@ #define OXYGEN_I2S_FORMAT_I2S 0x0000 #define OXYGEN_I2S_FORMAT_LJUST 0x0008 #define OXYGEN_I2S_MCLK_MASK 0x0030 /* MCLK/LRCK */ -#define OXYGEN_I2S_MCLK_128 0x0000 -#define OXYGEN_I2S_MCLK_256 0x0010 -#define OXYGEN_I2S_MCLK_512 0x0020 +#define OXYGEN_I2S_MCLK_SHIFT 4 +#define MCLK_128 0 +#define MCLK_256 1 +#define MCLK_512 2 +#define OXYGEN_I2S_MCLK(f) (((f) & 3) << OXYGEN_I2S_MCLK_SHIFT) #define OXYGEN_I2S_BITS_MASK 0x00c0 #define OXYGEN_I2S_BITS_16 0x0000 #define OXYGEN_I2S_BITS_20 0x0040 |