Lines Matching +full:12 +full:- +full:bit
1 // SPDX-License-Identifier: GPL-2.0-only
3 * bebob_command.c - driver for BeBoB based devices
5 * Copyright (c) 2013-2014 Takashi Sakamoto
16 buf = kzalloc(12, GFP_KERNEL); in avc_audio_set_selector()
18 return -ENOMEM; in avc_audio_set_selector()
30 err = fcp_avc_transaction(unit, buf, 12, buf, 12, in avc_audio_set_selector()
31 BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) | in avc_audio_set_selector()
32 BIT(6) | BIT(7) | BIT(8)); in avc_audio_set_selector()
36 err = -EIO; in avc_audio_set_selector()
38 err = -ENOSYS; in avc_audio_set_selector()
40 err = -EINVAL; in avc_audio_set_selector()
54 buf = kzalloc(12, GFP_KERNEL); in avc_audio_get_selector()
56 return -ENOMEM; in avc_audio_get_selector()
68 err = fcp_avc_transaction(unit, buf, 12, buf, 12, in avc_audio_get_selector()
69 BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) | in avc_audio_get_selector()
70 BIT(6) | BIT(8)); in avc_audio_get_selector()
74 err = -EIO; in avc_audio_get_selector()
76 err = -ENOSYS; in avc_audio_get_selector()
78 err = -EINVAL; in avc_audio_get_selector()
80 err = -EAGAIN; in avc_audio_get_selector()
116 buf = kzalloc(12, GFP_KERNEL); in avc_bridgeco_get_plug_type()
118 return -ENOMEM; in avc_bridgeco_get_plug_type()
123 err = fcp_avc_transaction(unit, buf, 12, buf, 12, in avc_bridgeco_get_plug_type()
124 BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) | in avc_bridgeco_get_plug_type()
125 BIT(6) | BIT(7) | BIT(9)); in avc_bridgeco_get_plug_type()
129 err = -EIO; in avc_bridgeco_get_plug_type()
131 err = -ENOSYS; in avc_bridgeco_get_plug_type()
133 err = -EINVAL; in avc_bridgeco_get_plug_type()
135 err = -EAGAIN; in avc_bridgeco_get_plug_type()
152 buf = kzalloc(12, GFP_KERNEL); in avc_bridgeco_get_plug_ch_count()
154 return -ENOMEM; in avc_bridgeco_get_plug_ch_count()
159 err = fcp_avc_transaction(unit, buf, 12, buf, 12, in avc_bridgeco_get_plug_ch_count()
160 BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) | in avc_bridgeco_get_plug_ch_count()
161 BIT(6) | BIT(7) | BIT(9)); in avc_bridgeco_get_plug_ch_count()
165 err = -EIO; in avc_bridgeco_get_plug_ch_count()
167 err = -ENOSYS; in avc_bridgeco_get_plug_ch_count()
169 err = -EINVAL; in avc_bridgeco_get_plug_ch_count()
171 err = -EAGAIN; in avc_bridgeco_get_plug_ch_count()
191 err = fcp_avc_transaction(unit, buf, 12, buf, 256, in avc_bridgeco_get_plug_ch_pos()
192 BIT(1) | BIT(2) | BIT(3) | BIT(4) | in avc_bridgeco_get_plug_ch_pos()
193 BIT(5) | BIT(6) | BIT(7) | BIT(9)); in avc_bridgeco_get_plug_ch_pos()
197 err = -EIO; in avc_bridgeco_get_plug_ch_pos()
199 err = -ENOSYS; in avc_bridgeco_get_plug_ch_pos()
201 err = -EINVAL; in avc_bridgeco_get_plug_ch_pos()
203 err = -EAGAIN; in avc_bridgeco_get_plug_ch_pos()
208 memmove(buf, buf + 10, err - 10); in avc_bridgeco_get_plug_ch_pos()
222 buf = kzalloc(12, GFP_KERNEL); in avc_bridgeco_get_plug_section_type()
224 return -ENOMEM; in avc_bridgeco_get_plug_section_type()
230 err = fcp_avc_transaction(unit, buf, 12, buf, 12, in avc_bridgeco_get_plug_section_type()
231 BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) | in avc_bridgeco_get_plug_section_type()
232 BIT(6) | BIT(7) | BIT(9) | BIT(10)); in avc_bridgeco_get_plug_section_type()
235 else if (err < 12) in avc_bridgeco_get_plug_section_type()
236 err = -EIO; in avc_bridgeco_get_plug_section_type()
238 err = -ENOSYS; in avc_bridgeco_get_plug_section_type()
240 err = -EINVAL; in avc_bridgeco_get_plug_section_type()
242 err = -EAGAIN; in avc_bridgeco_get_plug_section_type()
261 return -ENOMEM; in avc_bridgeco_get_plug_input()
267 BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) | in avc_bridgeco_get_plug_input()
268 BIT(6) | BIT(7)); in avc_bridgeco_get_plug_input()
272 err = -EIO; in avc_bridgeco_get_plug_input()
274 err = -ENOSYS; in avc_bridgeco_get_plug_input()
276 err = -EINVAL; in avc_bridgeco_get_plug_input()
278 err = -EAGAIN; in avc_bridgeco_get_plug_input()
296 if ((buf == NULL) || (*len < 12)) { in avc_bridgeco_get_plug_strm_fmt()
297 err = -EINVAL; in avc_bridgeco_get_plug_strm_fmt()
303 buf[3] = 0xc1; /* Bridgeco extension - List Request */ in avc_bridgeco_get_plug_strm_fmt()
307 err = fcp_avc_transaction(unit, buf, 12, buf, *len, in avc_bridgeco_get_plug_strm_fmt()
308 BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) | in avc_bridgeco_get_plug_strm_fmt()
309 BIT(6) | BIT(7) | BIT(10)); in avc_bridgeco_get_plug_strm_fmt()
312 else if (err < 12) in avc_bridgeco_get_plug_strm_fmt()
313 err = -EIO; in avc_bridgeco_get_plug_strm_fmt()
315 err = -ENOSYS; in avc_bridgeco_get_plug_strm_fmt()
317 err = -EINVAL; in avc_bridgeco_get_plug_strm_fmt()
319 err = -EAGAIN; in avc_bridgeco_get_plug_strm_fmt()
321 err = -EIO; in avc_bridgeco_get_plug_strm_fmt()
326 memmove(buf, buf + 11, err - 11); in avc_bridgeco_get_plug_strm_fmt()
327 *len = err - 11; in avc_bridgeco_get_plug_strm_fmt()