Lines Matching refs:buf

13 	u8 *buf;
16 buf = kzalloc(12, GFP_KERNEL);
17 if (buf == NULL)
20 buf[0] = 0x00; /* AV/C CONTROL */
21 buf[1] = 0x08 | (0x07 & subunit_id); /* AUDIO SUBUNIT ID */
22 buf[2] = 0xb8; /* FUNCTION BLOCK */
23 buf[3] = 0x80; /* type is 'selector'*/
24 buf[4] = 0xff & fb_id; /* function block id */
25 buf[5] = 0x10; /* control attribute is CURRENT */
26 buf[6] = 0x02; /* selector length is 2 */
27 buf[7] = 0xff & num; /* input function block plug number */
28 buf[8] = 0x01; /* control selector is SELECTOR_CONTROL */
30 err = fcp_avc_transaction(unit, buf, 12, buf, 12,
37 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
39 else if (buf[0] == 0x0a) /* REJECTED */
44 kfree(buf);
51 u8 *buf;
54 buf = kzalloc(12, GFP_KERNEL);
55 if (buf == NULL)
58 buf[0] = 0x01; /* AV/C STATUS */
59 buf[1] = 0x08 | (0x07 & subunit_id); /* AUDIO SUBUNIT ID */
60 buf[2] = 0xb8; /* FUNCTION BLOCK */
61 buf[3] = 0x80; /* type is 'selector'*/
62 buf[4] = 0xff & fb_id; /* function block id */
63 buf[5] = 0x10; /* control attribute is CURRENT */
64 buf[6] = 0x02; /* selector length is 2 */
65 buf[7] = 0xff; /* input function block plug number */
66 buf[8] = 0x01; /* control selector is SELECTOR_CONTROL */
68 err = fcp_avc_transaction(unit, buf, 12, buf, 12,
75 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
77 else if (buf[0] == 0x0a) /* REJECTED */
79 else if (buf[0] == 0x0b) /* IN TRANSITION */
84 *num = buf[7];
87 kfree(buf);
92 avc_bridgeco_fill_extension_addr(u8 *buf, u8 *addr)
94 buf[1] = addr[0];
95 memcpy(buf + 4, addr + 1, 5);
99 avc_bridgeco_fill_plug_info_extension_command(u8 *buf, u8 *addr,
102 buf[0] = 0x01; /* AV/C STATUS */
103 buf[2] = 0x02; /* AV/C GENERAL PLUG INFO */
104 buf[3] = 0xc0; /* BridgeCo extension */
105 avc_bridgeco_fill_extension_addr(buf, addr);
106 buf[9] = itype; /* info type */
113 u8 *buf;
116 buf = kzalloc(12, GFP_KERNEL);
117 if (buf == NULL)
121 avc_bridgeco_fill_plug_info_extension_command(buf, addr, 0x00);
123 err = fcp_avc_transaction(unit, buf, 12, buf, 12,
130 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
132 else if (buf[0] == 0x0a) /* REJECTED */
134 else if (buf[0] == 0x0b) /* IN TRANSITION */
139 *type = buf[10];
142 kfree(buf);
149 u8 *buf;
152 buf = kzalloc(12, GFP_KERNEL);
153 if (buf == NULL)
157 avc_bridgeco_fill_plug_info_extension_command(buf, addr, 0x02);
159 err = fcp_avc_transaction(unit, buf, 12, buf, 12,
166 else if (buf[0] == 0x08) // NOT IMPLEMENTED
168 else if (buf[0] == 0x0a) // REJECTED
170 else if (buf[0] == 0x0b) // IN TRANSITION
175 *ch_count = buf[10];
178 kfree(buf);
184 u8 *buf, unsigned int len)
189 avc_bridgeco_fill_plug_info_extension_command(buf, addr, 0x03);
191 err = fcp_avc_transaction(unit, buf, 12, buf, 256,
198 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
200 else if (buf[0] == 0x0a) /* REJECTED */
202 else if (buf[0] == 0x0b) /* IN TRANSITION */
208 memmove(buf, buf + 10, err - 10);
218 u8 *buf;
222 buf = kzalloc(12, GFP_KERNEL);
223 if (buf == NULL)
227 avc_bridgeco_fill_plug_info_extension_command(buf, addr, 0x07);
228 buf[10] = 0xff & ++id; /* section id */
230 err = fcp_avc_transaction(unit, buf, 12, buf, 12,
237 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
239 else if (buf[0] == 0x0a) /* REJECTED */
241 else if (buf[0] == 0x0b) /* IN TRANSITION */
246 *type = buf[11];
249 kfree(buf);
257 u8 *buf;
259 buf = kzalloc(18, GFP_KERNEL);
260 if (buf == NULL)
264 avc_bridgeco_fill_plug_info_extension_command(buf, addr, 0x05);
266 err = fcp_avc_transaction(unit, buf, 16, buf, 16,
273 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
275 else if (buf[0] == 0x0a) /* REJECTED */
277 else if (buf[0] == 0x0b) /* IN TRANSITION */
282 memcpy(input, buf + 10, 5);
285 kfree(buf);
290 u8 addr[AVC_BRIDGECO_ADDR_BYTES], u8 *buf,
296 if ((buf == NULL) || (*len < 12)) {
301 buf[0] = 0x01; /* AV/C STATUS */
302 buf[2] = 0x2f; /* AV/C STREAM FORMAT SUPPORT */
303 buf[3] = 0xc1; /* Bridgeco extension - List Request */
304 avc_bridgeco_fill_extension_addr(buf, addr);
305 buf[10] = 0xff & eid; /* Entry ID */
307 err = fcp_avc_transaction(unit, buf, 12, buf, *len,
314 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
316 else if (buf[0] == 0x0a) /* REJECTED */
318 else if (buf[0] == 0x0b) /* IN TRANSITION */
320 else if (buf[10] != eid)
326 memmove(buf, buf + 11, err - 11);