hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/include/sound/pcm_params.h
....@@ -1,25 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 #ifndef __SOUND_PCM_PARAMS_H
23 #define __SOUND_PCM_PARAMS_H
34
45 /*
56 * PCM params helpers
67 * Copyright (c) by Abramo Bagnara <abramo@alsa-project.org>
7
- *
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program; if not, write to the Free Software
21
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
- *
238 */
249
2510 #include <sound/pcm.h>
....@@ -37,11 +22,6 @@
3722 #define SNDRV_MASK_SIZE (SNDRV_MASK_BITS / 32)
3823 #define MASK_OFS(i) ((i) >> 5)
3924 #define MASK_BIT(i) (1U << ((i) & 31))
40
-
41
-static inline size_t snd_mask_sizeof(void)
42
-{
43
- return sizeof(struct snd_mask);
44
-}
4525
4626 static inline void snd_mask_none(struct snd_mask *mask)
4727 {
....@@ -148,6 +128,13 @@
148128 return mask->bits[MASK_OFS(val)] & MASK_BIT(val);
149129 }
150130
131
+/* Most of drivers need only this one */
132
+static inline int snd_mask_test_format(const struct snd_mask *mask,
133
+ snd_pcm_format_t format)
134
+{
135
+ return snd_mask_test(mask, (__force unsigned int)format);
136
+}
137
+
151138 static inline int snd_mask_single(const struct snd_mask *mask)
152139 {
153140 int i, c = 0;