Lines Matching full:packet
176 static void vivid_vbi_gen_set_time_of_day(u8 *packet) in vivid_vbi_gen_set_time_of_day() argument
182 packet[0] = calc_parity(0x07); in vivid_vbi_gen_set_time_of_day()
183 packet[1] = calc_parity(0x01); in vivid_vbi_gen_set_time_of_day()
184 packet[2] = calc_parity(0x40 | tm.tm_min); in vivid_vbi_gen_set_time_of_day()
185 packet[3] = calc_parity(0x40 | tm.tm_hour); in vivid_vbi_gen_set_time_of_day()
186 packet[4] = calc_parity(0x40 | tm.tm_mday); in vivid_vbi_gen_set_time_of_day()
189 packet[4] = calc_parity(0x60 | tm.tm_mday); in vivid_vbi_gen_set_time_of_day()
190 packet[5] = calc_parity(0x40 | (1 + tm.tm_mon)); in vivid_vbi_gen_set_time_of_day()
191 packet[6] = calc_parity(0x40 | (1 + tm.tm_wday)); in vivid_vbi_gen_set_time_of_day()
192 packet[7] = calc_parity(0x40 | ((tm.tm_year - 90) & 0x3f)); in vivid_vbi_gen_set_time_of_day()
193 packet[8] = calc_parity(0x0f); in vivid_vbi_gen_set_time_of_day()
195 checksum += packet[i] & 0x7f; in vivid_vbi_gen_set_time_of_day()
196 packet[9] = calc_parity(0x100 - checksum); in vivid_vbi_gen_set_time_of_day()
198 packet[10] = calc_parity(0x07); in vivid_vbi_gen_set_time_of_day()
199 packet[11] = calc_parity(0x04); in vivid_vbi_gen_set_time_of_day()
201 packet[12] = calc_parity(0x40 | ((sys_tz.tz_minuteswest / 60) & 0x1f)); in vivid_vbi_gen_set_time_of_day()
203 packet[12] = calc_parity(0x40 | ((24 + sys_tz.tz_minuteswest / 60) & 0x1f)); in vivid_vbi_gen_set_time_of_day()
204 packet[13] = calc_parity(0); in vivid_vbi_gen_set_time_of_day()
205 packet[14] = calc_parity(0x0f); in vivid_vbi_gen_set_time_of_day()
207 checksum += packet[i] & 0x7f; in vivid_vbi_gen_set_time_of_day()
208 packet[15] = calc_parity(0x100 - checksum); in vivid_vbi_gen_set_time_of_day()
216 static void vivid_vbi_gen_teletext(u8 *packet, unsigned line, unsigned frame) in vivid_vbi_gen_teletext() argument
221 packet[0] = hamming[1 + ((line & 1) << 3)]; in vivid_vbi_gen_teletext()
222 packet[1] = hamming[line >> 1]; in vivid_vbi_gen_teletext()
223 memset(packet + 2, 0x20, 40); in vivid_vbi_gen_teletext()
226 packet[2] = hamming[frame % 10]; in vivid_vbi_gen_teletext()
227 packet[3] = hamming[frame / 10]; in vivid_vbi_gen_teletext()
228 packet[4] = hamming[0]; in vivid_vbi_gen_teletext()
229 packet[5] = hamming[0]; in vivid_vbi_gen_teletext()
230 packet[6] = hamming[0]; in vivid_vbi_gen_teletext()
231 packet[7] = hamming[0]; in vivid_vbi_gen_teletext()
232 packet[8] = hamming[0]; in vivid_vbi_gen_teletext()
233 packet[9] = hamming[1]; in vivid_vbi_gen_teletext()
236 packet += offset; in vivid_vbi_gen_teletext()
237 memcpy(packet, "Page: 100 Row: 10", 17); in vivid_vbi_gen_teletext()
238 packet[7] = '0' + frame / 10; in vivid_vbi_gen_teletext()
239 packet[8] = '0' + frame % 10; in vivid_vbi_gen_teletext()
240 packet[15] = '0' + line / 10; in vivid_vbi_gen_teletext()
241 packet[16] = '0' + line % 10; in vivid_vbi_gen_teletext()
243 packet[i] = calc_parity(packet[i]); in vivid_vbi_gen_teletext()