xref: /openbmc/linux/drivers/media/test-drivers/vivid/vivid-vbi-gen.c (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
1dacca5f0SHans Verkuil // SPDX-License-Identifier: GPL-2.0-only
2dacca5f0SHans Verkuil /*
3dacca5f0SHans Verkuil  * vivid-vbi-gen.c - vbi generator support functions.
4dacca5f0SHans Verkuil  *
5dacca5f0SHans Verkuil  * Copyright 2014 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
6dacca5f0SHans Verkuil  */
7dacca5f0SHans Verkuil 
8dacca5f0SHans Verkuil #include <linux/errno.h>
9dacca5f0SHans Verkuil #include <linux/kernel.h>
10dacca5f0SHans Verkuil #include <linux/ktime.h>
11dacca5f0SHans Verkuil #include <linux/string.h>
12dacca5f0SHans Verkuil #include <linux/videodev2.h>
13dacca5f0SHans Verkuil 
14dacca5f0SHans Verkuil #include "vivid-vbi-gen.h"
15dacca5f0SHans Verkuil 
wss_insert(u8 * wss,u32 val,unsigned size)16dacca5f0SHans Verkuil static void wss_insert(u8 *wss, u32 val, unsigned size)
17dacca5f0SHans Verkuil {
18dacca5f0SHans Verkuil 	while (size--)
19dacca5f0SHans Verkuil 		*wss++ = (val & (1 << size)) ? 0xc0 : 0x10;
20dacca5f0SHans Verkuil }
21dacca5f0SHans Verkuil 
vivid_vbi_gen_wss_raw(const struct v4l2_sliced_vbi_data * data,u8 * buf,unsigned sampling_rate)22dacca5f0SHans Verkuil static void vivid_vbi_gen_wss_raw(const struct v4l2_sliced_vbi_data *data,
23dacca5f0SHans Verkuil 		u8 *buf, unsigned sampling_rate)
24dacca5f0SHans Verkuil {
25dacca5f0SHans Verkuil 	const unsigned rate = 5000000;	/* WSS has a 5 MHz transmission rate */
26dacca5f0SHans Verkuil 	u8 wss[29 + 24 + 24 + 24 + 18 + 18] = { 0 };
27dacca5f0SHans Verkuil 	const unsigned zero = 0x07;
28dacca5f0SHans Verkuil 	const unsigned one = 0x38;
29dacca5f0SHans Verkuil 	unsigned bit = 0;
30dacca5f0SHans Verkuil 	u16 wss_data;
31dacca5f0SHans Verkuil 	int i;
32dacca5f0SHans Verkuil 
33dacca5f0SHans Verkuil 	wss_insert(wss + bit, 0x1f1c71c7, 29); bit += 29;
34dacca5f0SHans Verkuil 	wss_insert(wss + bit, 0x1e3c1f, 24); bit += 24;
35dacca5f0SHans Verkuil 
36dacca5f0SHans Verkuil 	wss_data = (data->data[1] << 8) | data->data[0];
37dacca5f0SHans Verkuil 	for (i = 0; i <= 13; i++, bit += 6)
38dacca5f0SHans Verkuil 		wss_insert(wss + bit, (wss_data & (1 << i)) ? one : zero, 6);
39dacca5f0SHans Verkuil 
40dacca5f0SHans Verkuil 	for (i = 0, bit = 0; bit < sizeof(wss); bit++) {
41dacca5f0SHans Verkuil 		unsigned n = ((bit + 1) * sampling_rate) / rate;
42dacca5f0SHans Verkuil 
43dacca5f0SHans Verkuil 		while (i < n)
44dacca5f0SHans Verkuil 			buf[i++] = wss[bit];
45dacca5f0SHans Verkuil 	}
46dacca5f0SHans Verkuil }
47dacca5f0SHans Verkuil 
vivid_vbi_gen_teletext_raw(const struct v4l2_sliced_vbi_data * data,u8 * buf,unsigned sampling_rate)48dacca5f0SHans Verkuil static void vivid_vbi_gen_teletext_raw(const struct v4l2_sliced_vbi_data *data,
49dacca5f0SHans Verkuil 		u8 *buf, unsigned sampling_rate)
50dacca5f0SHans Verkuil {
51dacca5f0SHans Verkuil 	const unsigned rate = 6937500 / 10;	/* Teletext has a 6.9375 MHz transmission rate */
52dacca5f0SHans Verkuil 	u8 teletext[45] = { 0x55, 0x55, 0x27 };
53dacca5f0SHans Verkuil 	unsigned bit = 0;
54dacca5f0SHans Verkuil 	int i;
55dacca5f0SHans Verkuil 
56dacca5f0SHans Verkuil 	memcpy(teletext + 3, data->data, sizeof(teletext) - 3);
57dacca5f0SHans Verkuil 	/* prevents 32 bit overflow */
58dacca5f0SHans Verkuil 	sampling_rate /= 10;
59dacca5f0SHans Verkuil 
60dacca5f0SHans Verkuil 	for (i = 0, bit = 0; bit < sizeof(teletext) * 8; bit++) {
61dacca5f0SHans Verkuil 		unsigned n = ((bit + 1) * sampling_rate) / rate;
62dacca5f0SHans Verkuil 		u8 val = (teletext[bit / 8] & (1 << (bit & 7))) ? 0xc0 : 0x10;
63dacca5f0SHans Verkuil 
64dacca5f0SHans Verkuil 		while (i < n)
65dacca5f0SHans Verkuil 			buf[i++] = val;
66dacca5f0SHans Verkuil 	}
67dacca5f0SHans Verkuil }
68dacca5f0SHans Verkuil 
cc_insert(u8 * cc,u8 ch)69dacca5f0SHans Verkuil static void cc_insert(u8 *cc, u8 ch)
70dacca5f0SHans Verkuil {
71dacca5f0SHans Verkuil 	unsigned tot = 0;
72dacca5f0SHans Verkuil 	unsigned i;
73dacca5f0SHans Verkuil 
74dacca5f0SHans Verkuil 	for (i = 0; i < 7; i++) {
75dacca5f0SHans Verkuil 		cc[2 * i] = cc[2 * i + 1] = (ch & (1 << i)) ? 1 : 0;
76dacca5f0SHans Verkuil 		tot += cc[2 * i];
77dacca5f0SHans Verkuil 	}
78dacca5f0SHans Verkuil 	cc[14] = cc[15] = !(tot & 1);
79dacca5f0SHans Verkuil }
80dacca5f0SHans Verkuil 
81dacca5f0SHans Verkuil #define CC_PREAMBLE_BITS (14 + 4 + 2)
82dacca5f0SHans Verkuil 
vivid_vbi_gen_cc_raw(const struct v4l2_sliced_vbi_data * data,u8 * buf,unsigned sampling_rate)83dacca5f0SHans Verkuil static void vivid_vbi_gen_cc_raw(const struct v4l2_sliced_vbi_data *data,
84dacca5f0SHans Verkuil 		u8 *buf, unsigned sampling_rate)
85dacca5f0SHans Verkuil {
86dacca5f0SHans Verkuil 	const unsigned rate = 1000000;	/* CC has a 1 MHz transmission rate */
87dacca5f0SHans Verkuil 
88dacca5f0SHans Verkuil 	u8 cc[CC_PREAMBLE_BITS + 2 * 16] = {
89dacca5f0SHans Verkuil 		/* Clock run-in: 7 cycles */
90dacca5f0SHans Verkuil 		0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
91dacca5f0SHans Verkuil 		/* 2 cycles of 0 */
92dacca5f0SHans Verkuil 		0, 0, 0, 0,
93dacca5f0SHans Verkuil 		/* Start bit of 1 (each bit is two cycles) */
94dacca5f0SHans Verkuil 		1, 1
95dacca5f0SHans Verkuil 	};
96dacca5f0SHans Verkuil 	unsigned bit, i;
97dacca5f0SHans Verkuil 
98dacca5f0SHans Verkuil 	cc_insert(cc + CC_PREAMBLE_BITS, data->data[0]);
99dacca5f0SHans Verkuil 	cc_insert(cc + CC_PREAMBLE_BITS + 16, data->data[1]);
100dacca5f0SHans Verkuil 
101dacca5f0SHans Verkuil 	for (i = 0, bit = 0; bit < sizeof(cc); bit++) {
102dacca5f0SHans Verkuil 		unsigned n = ((bit + 1) * sampling_rate) / rate;
103dacca5f0SHans Verkuil 
104dacca5f0SHans Verkuil 		while (i < n)
105dacca5f0SHans Verkuil 			buf[i++] = cc[bit] ? 0xc0 : 0x10;
106dacca5f0SHans Verkuil 	}
107dacca5f0SHans Verkuil }
108dacca5f0SHans Verkuil 
vivid_vbi_gen_raw(const struct vivid_vbi_gen_data * vbi,const struct v4l2_vbi_format * vbi_fmt,u8 * buf)109dacca5f0SHans Verkuil void vivid_vbi_gen_raw(const struct vivid_vbi_gen_data *vbi,
110dacca5f0SHans Verkuil 		const struct v4l2_vbi_format *vbi_fmt, u8 *buf)
111dacca5f0SHans Verkuil {
112dacca5f0SHans Verkuil 	unsigned idx;
113dacca5f0SHans Verkuil 
114dacca5f0SHans Verkuil 	for (idx = 0; idx < 25; idx++) {
115dacca5f0SHans Verkuil 		const struct v4l2_sliced_vbi_data *data = vbi->data + idx;
116dacca5f0SHans Verkuil 		unsigned start_2nd_field;
117dacca5f0SHans Verkuil 		unsigned line = data->line;
118dacca5f0SHans Verkuil 		u8 *linebuf = buf;
119dacca5f0SHans Verkuil 
120dacca5f0SHans Verkuil 		start_2nd_field = (data->id & V4L2_SLICED_VBI_525) ? 263 : 313;
121dacca5f0SHans Verkuil 		if (data->field)
122dacca5f0SHans Verkuil 			line += start_2nd_field;
123dacca5f0SHans Verkuil 		line -= vbi_fmt->start[data->field];
124dacca5f0SHans Verkuil 
125dacca5f0SHans Verkuil 		if (vbi_fmt->flags & V4L2_VBI_INTERLACED)
126dacca5f0SHans Verkuil 			linebuf += (line * 2 + data->field) *
127dacca5f0SHans Verkuil 				vbi_fmt->samples_per_line;
128dacca5f0SHans Verkuil 		else
129dacca5f0SHans Verkuil 			linebuf += (line + data->field * vbi_fmt->count[0]) *
130dacca5f0SHans Verkuil 				vbi_fmt->samples_per_line;
131dacca5f0SHans Verkuil 		if (data->id == V4L2_SLICED_CAPTION_525)
132dacca5f0SHans Verkuil 			vivid_vbi_gen_cc_raw(data, linebuf, vbi_fmt->sampling_rate);
133dacca5f0SHans Verkuil 		else if (data->id == V4L2_SLICED_WSS_625)
134dacca5f0SHans Verkuil 			vivid_vbi_gen_wss_raw(data, linebuf, vbi_fmt->sampling_rate);
135dacca5f0SHans Verkuil 		else if (data->id == V4L2_SLICED_TELETEXT_B)
136dacca5f0SHans Verkuil 			vivid_vbi_gen_teletext_raw(data, linebuf, vbi_fmt->sampling_rate);
137dacca5f0SHans Verkuil 	}
138dacca5f0SHans Verkuil }
139dacca5f0SHans Verkuil 
140dacca5f0SHans Verkuil static const u8 vivid_cc_sequence1[30] = {
141dacca5f0SHans Verkuil 	0x14, 0x20,	/* Resume Caption Loading */
142dacca5f0SHans Verkuil 	'H',  'e',
143dacca5f0SHans Verkuil 	'l',  'l',
144dacca5f0SHans Verkuil 	'o',  ' ',
145dacca5f0SHans Verkuil 	'w',  'o',
146dacca5f0SHans Verkuil 	'r',  'l',
147dacca5f0SHans Verkuil 	'd',  '!',
148dacca5f0SHans Verkuil 	0x14, 0x2f,	/* End of Caption */
149dacca5f0SHans Verkuil };
150dacca5f0SHans Verkuil 
151dacca5f0SHans Verkuil static const u8 vivid_cc_sequence2[30] = {
152dacca5f0SHans Verkuil 	0x14, 0x20,	/* Resume Caption Loading */
153dacca5f0SHans Verkuil 	'C',  'l',
154dacca5f0SHans Verkuil 	'o',  's',
155dacca5f0SHans Verkuil 	'e',  'd',
156dacca5f0SHans Verkuil 	' ',  'c',
157dacca5f0SHans Verkuil 	'a',  'p',
158dacca5f0SHans Verkuil 	't',  'i',
159dacca5f0SHans Verkuil 	'o',  'n',
160dacca5f0SHans Verkuil 	's',  ' ',
161dacca5f0SHans Verkuil 	't',  'e',
162dacca5f0SHans Verkuil 	's',  't',
163dacca5f0SHans Verkuil 	0x14, 0x2f,	/* End of Caption */
164dacca5f0SHans Verkuil };
165dacca5f0SHans Verkuil 
calc_parity(u8 val)166dacca5f0SHans Verkuil static u8 calc_parity(u8 val)
167dacca5f0SHans Verkuil {
168dacca5f0SHans Verkuil 	unsigned i;
169dacca5f0SHans Verkuil 	unsigned tot = 0;
170dacca5f0SHans Verkuil 
171dacca5f0SHans Verkuil 	for (i = 0; i < 7; i++)
172dacca5f0SHans Verkuil 		tot += (val & (1 << i)) ? 1 : 0;
173dacca5f0SHans Verkuil 	return val | ((tot & 1) ? 0 : 0x80);
174dacca5f0SHans Verkuil }
175dacca5f0SHans Verkuil 
vivid_vbi_gen_set_time_of_day(u8 * packet)176dacca5f0SHans Verkuil static void vivid_vbi_gen_set_time_of_day(u8 *packet)
177dacca5f0SHans Verkuil {
178dacca5f0SHans Verkuil 	struct tm tm;
179dacca5f0SHans Verkuil 	u8 checksum, i;
180dacca5f0SHans Verkuil 
181dacca5f0SHans Verkuil 	time64_to_tm(ktime_get_real_seconds(), 0, &tm);
182dacca5f0SHans Verkuil 	packet[0] = calc_parity(0x07);
183dacca5f0SHans Verkuil 	packet[1] = calc_parity(0x01);
184dacca5f0SHans Verkuil 	packet[2] = calc_parity(0x40 | tm.tm_min);
185dacca5f0SHans Verkuil 	packet[3] = calc_parity(0x40 | tm.tm_hour);
186dacca5f0SHans Verkuil 	packet[4] = calc_parity(0x40 | tm.tm_mday);
187dacca5f0SHans Verkuil 	if (tm.tm_mday == 1 && tm.tm_mon == 2 &&
188dacca5f0SHans Verkuil 	    sys_tz.tz_minuteswest > tm.tm_min + tm.tm_hour * 60)
189dacca5f0SHans Verkuil 		packet[4] = calc_parity(0x60 | tm.tm_mday);
190dacca5f0SHans Verkuil 	packet[5] = calc_parity(0x40 | (1 + tm.tm_mon));
191dacca5f0SHans Verkuil 	packet[6] = calc_parity(0x40 | (1 + tm.tm_wday));
192dacca5f0SHans Verkuil 	packet[7] = calc_parity(0x40 | ((tm.tm_year - 90) & 0x3f));
193dacca5f0SHans Verkuil 	packet[8] = calc_parity(0x0f);
194dacca5f0SHans Verkuil 	for (checksum = i = 0; i <= 8; i++)
195dacca5f0SHans Verkuil 		checksum += packet[i] & 0x7f;
196dacca5f0SHans Verkuil 	packet[9] = calc_parity(0x100 - checksum);
197dacca5f0SHans Verkuil 	packet[10] = calc_parity(0x07);
198dacca5f0SHans Verkuil 	packet[11] = calc_parity(0x04);
199dacca5f0SHans Verkuil 	if (sys_tz.tz_minuteswest >= 0)
200dacca5f0SHans Verkuil 		packet[12] = calc_parity(0x40 | ((sys_tz.tz_minuteswest / 60) & 0x1f));
201dacca5f0SHans Verkuil 	else
202dacca5f0SHans Verkuil 		packet[12] = calc_parity(0x40 | ((24 + sys_tz.tz_minuteswest / 60) & 0x1f));
203dacca5f0SHans Verkuil 	packet[13] = calc_parity(0);
204dacca5f0SHans Verkuil 	packet[14] = calc_parity(0x0f);
205dacca5f0SHans Verkuil 	for (checksum = 0, i = 10; i <= 14; i++)
206dacca5f0SHans Verkuil 		checksum += packet[i] & 0x7f;
207dacca5f0SHans Verkuil 	packet[15] = calc_parity(0x100 - checksum);
208dacca5f0SHans Verkuil }
209dacca5f0SHans Verkuil 
210dacca5f0SHans Verkuil static const u8 hamming[16] = {
211dacca5f0SHans Verkuil 	0x15, 0x02, 0x49, 0x5e, 0x64, 0x73, 0x38, 0x2f,
212dacca5f0SHans Verkuil 	0xd0, 0xc7, 0x8c, 0x9b, 0xa1, 0xb6, 0xfd, 0xea
213dacca5f0SHans Verkuil };
214dacca5f0SHans Verkuil 
vivid_vbi_gen_teletext(u8 * packet,unsigned line,unsigned frame)215dacca5f0SHans Verkuil static void vivid_vbi_gen_teletext(u8 *packet, unsigned line, unsigned frame)
216dacca5f0SHans Verkuil {
217dacca5f0SHans Verkuil 	unsigned offset = 2;
218dacca5f0SHans Verkuil 	unsigned i;
219dacca5f0SHans Verkuil 
220dacca5f0SHans Verkuil 	packet[0] = hamming[1 + ((line & 1) << 3)];
221dacca5f0SHans Verkuil 	packet[1] = hamming[line >> 1];
222dacca5f0SHans Verkuil 	memset(packet + 2, 0x20, 40);
223dacca5f0SHans Verkuil 	if (line == 0) {
224dacca5f0SHans Verkuil 		/* subcode */
225dacca5f0SHans Verkuil 		packet[2] = hamming[frame % 10];
226dacca5f0SHans Verkuil 		packet[3] = hamming[frame / 10];
227dacca5f0SHans Verkuil 		packet[4] = hamming[0];
228dacca5f0SHans Verkuil 		packet[5] = hamming[0];
229dacca5f0SHans Verkuil 		packet[6] = hamming[0];
230dacca5f0SHans Verkuil 		packet[7] = hamming[0];
231dacca5f0SHans Verkuil 		packet[8] = hamming[0];
232dacca5f0SHans Verkuil 		packet[9] = hamming[1];
233dacca5f0SHans Verkuil 		offset = 10;
234dacca5f0SHans Verkuil 	}
235dacca5f0SHans Verkuil 	packet += offset;
236dacca5f0SHans Verkuil 	memcpy(packet, "Page: 100 Row: 10", 17);
237dacca5f0SHans Verkuil 	packet[7] = '0' + frame / 10;
238dacca5f0SHans Verkuil 	packet[8] = '0' + frame % 10;
239dacca5f0SHans Verkuil 	packet[15] = '0' + line / 10;
240dacca5f0SHans Verkuil 	packet[16] = '0' + line % 10;
241dacca5f0SHans Verkuil 	for (i = 0; i < 42 - offset; i++)
242dacca5f0SHans Verkuil 		packet[i] = calc_parity(packet[i]);
243dacca5f0SHans Verkuil }
244dacca5f0SHans Verkuil 
vivid_vbi_gen_sliced(struct vivid_vbi_gen_data * vbi,bool is_60hz,unsigned seqnr)245dacca5f0SHans Verkuil void vivid_vbi_gen_sliced(struct vivid_vbi_gen_data *vbi,
246dacca5f0SHans Verkuil 		bool is_60hz, unsigned seqnr)
247dacca5f0SHans Verkuil {
248dacca5f0SHans Verkuil 	struct v4l2_sliced_vbi_data *data0 = vbi->data;
249dacca5f0SHans Verkuil 	struct v4l2_sliced_vbi_data *data1 = vbi->data + 1;
250dacca5f0SHans Verkuil 	unsigned frame = seqnr % 60;
251dacca5f0SHans Verkuil 
252dacca5f0SHans Verkuil 	memset(vbi->data, 0, sizeof(vbi->data));
253dacca5f0SHans Verkuil 
254dacca5f0SHans Verkuil 	if (!is_60hz) {
255dacca5f0SHans Verkuil 		unsigned i;
256dacca5f0SHans Verkuil 
257dacca5f0SHans Verkuil 		for (i = 0; i <= 11; i++) {
258dacca5f0SHans Verkuil 			data0->id = V4L2_SLICED_TELETEXT_B;
259dacca5f0SHans Verkuil 			data0->line = 7 + i;
260dacca5f0SHans Verkuil 			vivid_vbi_gen_teletext(data0->data, i, frame);
261dacca5f0SHans Verkuil 			data0++;
262dacca5f0SHans Verkuil 		}
263dacca5f0SHans Verkuil 		data0->id = V4L2_SLICED_WSS_625;
264dacca5f0SHans Verkuil 		data0->line = 23;
265dacca5f0SHans Verkuil 		/* 4x3 video aspect ratio */
266dacca5f0SHans Verkuil 		data0->data[0] = 0x08;
267dacca5f0SHans Verkuil 		data0++;
268dacca5f0SHans Verkuil 		for (i = 0; i <= 11; i++) {
269dacca5f0SHans Verkuil 			data0->id = V4L2_SLICED_TELETEXT_B;
270dacca5f0SHans Verkuil 			data0->field = 1;
271dacca5f0SHans Verkuil 			data0->line = 7 + i;
272dacca5f0SHans Verkuil 			vivid_vbi_gen_teletext(data0->data, 12 + i, frame);
273dacca5f0SHans Verkuil 			data0++;
274dacca5f0SHans Verkuil 		}
275dacca5f0SHans Verkuil 		return;
276dacca5f0SHans Verkuil 	}
277dacca5f0SHans Verkuil 
278dacca5f0SHans Verkuil 	data0->id = V4L2_SLICED_CAPTION_525;
279dacca5f0SHans Verkuil 	data0->line = 21;
280dacca5f0SHans Verkuil 	data1->id = V4L2_SLICED_CAPTION_525;
281dacca5f0SHans Verkuil 	data1->field = 1;
282dacca5f0SHans Verkuil 	data1->line = 21;
283dacca5f0SHans Verkuil 
284dacca5f0SHans Verkuil 	if (frame < 15) {
285dacca5f0SHans Verkuil 		data0->data[0] = calc_parity(vivid_cc_sequence1[2 * frame]);
286dacca5f0SHans Verkuil 		data0->data[1] = calc_parity(vivid_cc_sequence1[2 * frame + 1]);
287dacca5f0SHans Verkuil 	} else if (frame >= 30 && frame < 45) {
288dacca5f0SHans Verkuil 		frame -= 30;
289dacca5f0SHans Verkuil 		data0->data[0] = calc_parity(vivid_cc_sequence2[2 * frame]);
290dacca5f0SHans Verkuil 		data0->data[1] = calc_parity(vivid_cc_sequence2[2 * frame + 1]);
291dacca5f0SHans Verkuil 	} else {
292dacca5f0SHans Verkuil 		data0->data[0] = calc_parity(0);
293dacca5f0SHans Verkuil 		data0->data[1] = calc_parity(0);
294dacca5f0SHans Verkuil 	}
295dacca5f0SHans Verkuil 
296dacca5f0SHans Verkuil 	frame = seqnr % (30 * 60);
297dacca5f0SHans Verkuil 	switch (frame) {
298dacca5f0SHans Verkuil 	case 0:
299dacca5f0SHans Verkuil 		vivid_vbi_gen_set_time_of_day(vbi->time_of_day_packet);
300*1771e9fbSGustavo A. R. Silva 		fallthrough;
301dacca5f0SHans Verkuil 	case 1 ... 7:
302dacca5f0SHans Verkuil 		data1->data[0] = vbi->time_of_day_packet[frame * 2];
303dacca5f0SHans Verkuil 		data1->data[1] = vbi->time_of_day_packet[frame * 2 + 1];
304dacca5f0SHans Verkuil 		break;
305dacca5f0SHans Verkuil 	default:
306dacca5f0SHans Verkuil 		data1->data[0] = calc_parity(0);
307dacca5f0SHans Verkuil 		data1->data[1] = calc_parity(0);
308dacca5f0SHans Verkuil 		break;
309dacca5f0SHans Verkuil 	}
310dacca5f0SHans Verkuil }
311