Commit 33fa724e291d3cc6c319f7db487e6e084ef5d4b5

Authored by Clemens Ladisch
Committed by Takashi Iwai
1 parent f5b2368ba8

[ALSA] virtuoso: move PCM1796 symbols to a header file

Move the PCM1796 register symbol definitions to their own header file.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

Showing 2 changed files with 59 additions and 54 deletions Side-by-side Diff

sound/pci/oxygen/pcm1796.h
  1 +#ifndef PCM1796_H_INCLUDED
  2 +#define PCM1796_H_INCLUDED
  3 +
  4 +/* register 16 */
  5 +#define PCM1796_ATL_MASK 0xff
  6 +/* register 17 */
  7 +#define PCM1796_ATR_MASK 0xff
  8 +/* register 18 */
  9 +#define PCM1796_MUTE 0x01
  10 +#define PCM1796_DME 0x02
  11 +#define PCM1796_DMF_MASK 0x0c
  12 +#define PCM1796_DMF_DISABLED 0x00
  13 +#define PCM1796_DMF_48 0x04
  14 +#define PCM1796_DMF_441 0x08
  15 +#define PCM1796_DMF_32 0x0c
  16 +#define PCM1796_FMT_MASK 0x70
  17 +#define PCM1796_FMT_16_RJUST 0x00
  18 +#define PCM1796_FMT_20_RJUST 0x10
  19 +#define PCM1796_FMT_24_RJUST 0x20
  20 +#define PCM1796_FMT_24_LJUST 0x30
  21 +#define PCM1796_FMT_16_I2S 0x40
  22 +#define PCM1796_FMT_24_I2S 0x50
  23 +#define PCM1796_ATLD 0x80
  24 +/* register 19 */
  25 +#define PCM1796_INZD 0x01
  26 +#define PCM1796_FLT_MASK 0x02
  27 +#define PCM1796_FLT_SHARP 0x00
  28 +#define PCM1796_FLT_SLOW 0x02
  29 +#define PCM1796_DFMS 0x04
  30 +#define PCM1796_OPE 0x10
  31 +#define PCM1796_ATS_MASK 0x60
  32 +#define PCM1796_ATS_1 0x00
  33 +#define PCM1796_ATS_2 0x20
  34 +#define PCM1796_ATS_4 0x40
  35 +#define PCM1796_ATS_8 0x60
  36 +#define PCM1796_REV 0x80
  37 +/* register 20 */
  38 +#define PCM1796_OS_MASK 0x03
  39 +#define PCM1796_OS_64 0x00
  40 +#define PCM1796_OS_32 0x01
  41 +#define PCM1796_OS_128 0x02
  42 +#define PCM1796_CHSL_MASK 0x04
  43 +#define PCM1796_CHSL_LEFT 0x00
  44 +#define PCM1796_CHSL_RIGHT 0x04
  45 +#define PCM1796_MONO 0x08
  46 +#define PCM1796_DFTH 0x10
  47 +#define PCM1796_DSD 0x20
  48 +#define PCM1796_SRST 0x40
  49 +/* register 21 */
  50 +#define PCM1796_PCMZ 0x01
  51 +#define PCM1796_DZ_MASK 0x06
  52 +/* register 22 */
  53 +#define PCM1796_ZFGL 0x01
  54 +#define PCM1796_ZFGR 0x02
  55 +/* register 23 */
  56 +#define PCM1796_ID_MASK 0x1f
  57 +
  58 +#endif
sound/pci/oxygen/virtuoso.c
... ... @@ -47,6 +47,7 @@
47 47 #include <sound/tlv.h>
48 48 #include "oxygen.h"
49 49 #include "cm9780.h"
  50 +#include "pcm1796.h"
50 51  
51 52 MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
52 53 MODULE_DESCRIPTION("Asus AV200 driver");
... ... @@ -81,60 +82,6 @@
81 82 #define GPIO_OUTPUT_ENABLE 0x0100
82 83  
83 84 #define GPIO_LINE_MUTE CM9780_GPO0
84   -
85   -/* register 16 */
86   -#define PCM1796_ATL_MASK 0xff
87   -/* register 17 */
88   -#define PCM1796_ATR_MASK 0xff
89   -/* register 18 */
90   -#define PCM1796_MUTE 0x01
91   -#define PCM1796_DME 0x02
92   -#define PCM1796_DMF_MASK 0x0c
93   -#define PCM1796_DMF_DISABLED 0x00
94   -#define PCM1796_DMF_48 0x04
95   -#define PCM1796_DMF_441 0x08
96   -#define PCM1796_DMF_32 0x0c
97   -#define PCM1796_FMT_MASK 0x70
98   -#define PCM1796_FMT_16_RJUST 0x00
99   -#define PCM1796_FMT_20_RJUST 0x10
100   -#define PCM1796_FMT_24_RJUST 0x20
101   -#define PCM1796_FMT_24_LJUST 0x30
102   -#define PCM1796_FMT_16_I2S 0x40
103   -#define PCM1796_FMT_24_I2S 0x50
104   -#define PCM1796_ATLD 0x80
105   -/* register 19 */
106   -#define PCM1796_INZD 0x01
107   -#define PCM1796_FLT_MASK 0x02
108   -#define PCM1796_FLT_SHARP 0x00
109   -#define PCM1796_FLT_SLOW 0x02
110   -#define PCM1796_DFMS 0x04
111   -#define PCM1796_OPE 0x10
112   -#define PCM1796_ATS_MASK 0x60
113   -#define PCM1796_ATS_1 0x00
114   -#define PCM1796_ATS_2 0x20
115   -#define PCM1796_ATS_4 0x40
116   -#define PCM1796_ATS_8 0x60
117   -#define PCM1796_REV 0x80
118   -/* register 20 */
119   -#define PCM1796_OS_MASK 0x03
120   -#define PCM1796_OS_64 0x00
121   -#define PCM1796_OS_32 0x01
122   -#define PCM1796_OS_128 0x02
123   -#define PCM1796_CHSL_MASK 0x04
124   -#define PCM1796_CHSL_LEFT 0x00
125   -#define PCM1796_CHSL_RIGHT 0x04
126   -#define PCM1796_MONO 0x08
127   -#define PCM1796_DFTH 0x10
128   -#define PCM1796_DSD 0x20
129   -#define PCM1796_SRST 0x40
130   -/* register 21 */
131   -#define PCM1796_PCMZ 0x01
132   -#define PCM1796_DZ_MASK 0x06
133   -/* register 22 */
134   -#define PCM1796_ZFGL 0x01
135   -#define PCM1796_ZFGR 0x02
136   -/* register 23 */
137   -#define PCM1796_ID_MASK 0x1f
138 85  
139 86 struct xonar_data {
140 87 u8 is_d2x;