22 #include <linux/time.h>
23 #include <linux/export.h>
26 #define SND_PCM_FORMAT_UNKNOWN (-1)
40 #define INT __force int
44 .width = 8, .phys = 8, .le = -1, .signd = 1,
48 .width = 8, .phys = 8, .le = -1, .signd = 0,
52 .width = 16, .phys = 16, .le = 1, .signd = 1,
56 .width = 16, .phys = 16, .le = 0, .signd = 1,
60 .width = 16, .phys = 16, .le = 1, .signd = 0,
61 .silence = { 0x00, 0x80 },
64 .width = 16, .phys = 16, .le = 0, .signd = 0,
65 .silence = { 0x80, 0x00 },
68 .width = 24, .phys = 32, .le = 1, .signd = 1,
72 .width = 24, .phys = 32, .le = 0, .signd = 1,
76 .width = 24, .phys = 32, .le = 1, .signd = 0,
77 .silence = { 0x00, 0x00, 0x80 },
80 .width = 24, .phys = 32, .le = 0, .signd = 0,
81 .silence = { 0x00, 0x80, 0x00, 0x00 },
84 .width = 32, .phys = 32, .le = 1, .signd = 1,
88 .width = 32, .phys = 32, .le = 0, .signd = 1,
92 .width = 32, .phys = 32, .le = 1, .signd = 0,
93 .silence = { 0x00, 0x00, 0x00, 0x80 },
96 .width = 32, .phys = 32, .le = 0, .signd = 0,
97 .silence = { 0x80, 0x00, 0x00, 0x00 },
100 .width = 32, .phys = 32, .le = 1, .signd = -1,
104 .width = 32, .phys = 32, .le = 0, .signd = -1,
108 .width = 64, .phys = 64, .le = 1, .signd = -1,
112 .width = 64, .phys = 64, .le = 0, .signd = -1,
116 .width = 32, .phys = 32, .le = 1, .signd = -1,
120 .width = 32, .phys = 32, .le = 0, .signd = -1,
124 .width = 8, .phys = 8, .le = -1, .signd = -1,
128 .width = 8, .phys = 8, .le = -1, .signd = -1,
132 .width = 4, .phys = 4, .le = -1, .signd = -1,
136 .width = 3, .phys = 3, .le = -1, .signd = -1,
140 .width = 5, .phys = 5, .le = -1, .signd = -1,
145 .le = -1, .signd = -1,
148 .le = -1, .signd = -1,
151 .le = -1, .signd = -1,
154 .width = 24, .phys = 24, .le = 1, .signd = 1,
158 .width = 24, .phys = 24, .le = 0, .signd = 1,
162 .width = 24, .phys = 24, .le = 1, .signd = 0,
163 .silence = { 0x00, 0x00, 0x80 },
166 .width = 24, .phys = 24, .le = 0, .signd = 0,
167 .silence = { 0x80, 0x00, 0x00 },
170 .width = 20, .phys = 24, .le = 1, .signd = 1,
174 .width = 20, .phys = 24, .le = 0, .signd = 1,
178 .width = 20, .phys = 24, .le = 1, .signd = 0,
179 .silence = { 0x00, 0x00, 0x08 },
182 .width = 20, .phys = 24, .le = 0, .signd = 0,
183 .silence = { 0x08, 0x00, 0x00 },
186 .width = 18, .phys = 24, .le = 1, .signd = 1,
190 .width = 18, .phys = 24, .le = 0, .signd = 1,
194 .width = 18, .phys = 24, .le = 1, .signd = 0,
195 .silence = { 0x00, 0x00, 0x02 },
198 .width = 18, .phys = 24, .le = 0, .signd = 0,
199 .silence = { 0x02, 0x00, 0x00 },
202 .width = 3, .phys = 8, .le = -1, .signd = -1,
206 .width = 5, .phys = 8, .le = -1, .signd = -1,
224 if ((val = pcm_formats[(
INT)format].
signd) < 0)
275 if ((val = pcm_formats[(
INT)format].
le) < 0)
313 if ((val = pcm_formats[(
INT)format].
width) == 0)
332 if ((val = pcm_formats[(
INT)format].
phys) == 0)
352 return samples * phys_width / 8;
367 if (! pcm_formats[(
INT)format].
phys)
393 width = pcm_formats[(
INT)format].
phys;
399 unsigned int bytes = samples * width / 8;
400 memset(data, *pat, bytes);
458 if (runtime->
hw.rates & (1 << i)) {
464 if (runtime->
hw.rates & (1 << i)) {
504 if ((1
u << i) == rate_bit)