Lines Matching refs:buf
13 u8 *buf; in avc_stream_set_format() local
16 buf = kmalloc(len + 10, GFP_KERNEL); in avc_stream_set_format()
17 if (buf == NULL) in avc_stream_set_format()
20 buf[0] = 0x00; /* CONTROL */ in avc_stream_set_format()
21 buf[1] = 0xff; /* UNIT */ in avc_stream_set_format()
22 buf[2] = 0xbf; /* EXTENDED STREAM FORMAT INFORMATION */ in avc_stream_set_format()
23 buf[3] = 0xc0; /* SINGLE subfunction */ in avc_stream_set_format()
24 buf[4] = dir; /* Plug Direction */ in avc_stream_set_format()
25 buf[5] = 0x00; /* UNIT */ in avc_stream_set_format()
26 buf[6] = 0x00; /* PCR (Isochronous Plug) */ in avc_stream_set_format()
27 buf[7] = 0xff & pid; /* Plug ID */ in avc_stream_set_format()
28 buf[8] = 0xff; /* Padding */ in avc_stream_set_format()
29 buf[9] = 0xff; /* Support status in response */ in avc_stream_set_format()
30 memcpy(buf + 10, format, len); in avc_stream_set_format()
33 err = fcp_avc_transaction(unit, buf, len + 10, buf, len + 10, in avc_stream_set_format()
40 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */ in avc_stream_set_format()
42 else if (buf[0] == 0x0a) /* REJECTED */ in avc_stream_set_format()
47 kfree(buf); in avc_stream_set_format()
54 u8 *buf, unsigned int *len, unsigned int eid) in avc_stream_get_format() argument
64 buf[0] = 0x01; /* STATUS */ in avc_stream_get_format()
65 buf[1] = 0xff; /* UNIT */ in avc_stream_get_format()
66 buf[2] = 0xbf; /* EXTENDED STREAM FORMAT INFORMATION */ in avc_stream_get_format()
67 buf[3] = subfunc; /* SINGLE or LIST */ in avc_stream_get_format()
68 buf[4] = dir; /* Plug Direction */ in avc_stream_get_format()
69 buf[5] = 0x00; /* Unit */ in avc_stream_get_format()
70 buf[6] = 0x00; /* PCR (Isochronous Plug) */ in avc_stream_get_format()
71 buf[7] = 0xff & pid; /* Plug ID */ in avc_stream_get_format()
72 buf[8] = 0xff; /* Padding */ in avc_stream_get_format()
73 buf[9] = 0xff; /* support status in response */ in avc_stream_get_format()
74 buf[10] = 0xff & eid; /* entry ID for LIST subfunction */ in avc_stream_get_format()
75 buf[11] = 0xff; /* padding */ in avc_stream_get_format()
78 err = fcp_avc_transaction(unit, buf, 12, buf, *len, in avc_stream_get_format()
85 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */ in avc_stream_get_format()
87 else if (buf[0] == 0x0a) /* REJECTED */ in avc_stream_get_format()
89 else if (buf[0] == 0x0b) /* IN TRANSITION */ in avc_stream_get_format()
92 else if ((subfunc == 0xc1) && (buf[10] != eid)) in avc_stream_get_format()
99 memmove(buf, buf + 10, err - 10); in avc_stream_get_format()
102 memmove(buf, buf + 11, err - 11); in avc_stream_get_format()
116 u8 *buf; in avc_general_inquiry_sig_fmt() local
126 buf = kzalloc(8, GFP_KERNEL); in avc_general_inquiry_sig_fmt()
127 if (buf == NULL) in avc_general_inquiry_sig_fmt()
130 buf[0] = 0x02; /* SPECIFIC INQUIRY */ in avc_general_inquiry_sig_fmt()
131 buf[1] = 0xff; /* UNIT */ in avc_general_inquiry_sig_fmt()
133 buf[2] = 0x19; /* INPUT PLUG SIGNAL FORMAT */ in avc_general_inquiry_sig_fmt()
135 buf[2] = 0x18; /* OUTPUT PLUG SIGNAL FORMAT */ in avc_general_inquiry_sig_fmt()
136 buf[3] = 0xff & pid; /* plug id */ in avc_general_inquiry_sig_fmt()
137 buf[4] = 0x90; /* EOH_1, Form_1, FMT. AM824 */ in avc_general_inquiry_sig_fmt()
138 buf[5] = 0x07 & sfc; /* FDF-hi. AM824, frequency */ in avc_general_inquiry_sig_fmt()
139 buf[6] = 0xff; /* FDF-mid. AM824, SYT hi (not used) */ in avc_general_inquiry_sig_fmt()
140 buf[7] = 0xff; /* FDF-low. AM824, SYT lo (not used) */ in avc_general_inquiry_sig_fmt()
143 err = fcp_avc_transaction(unit, buf, 8, buf, 8, in avc_general_inquiry_sig_fmt()
149 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */ in avc_general_inquiry_sig_fmt()
156 kfree(buf); in avc_general_inquiry_sig_fmt()