[PATCH] v4l: update for SAA7134 cards
[linux-2.6.git] / drivers / media / video / saa7134 / saa7134.h
1 /*
2  * $Id: saa7134.h,v 1.41 2005/06/07 18:02:26 nsh Exp $
3  *
4  * v4l2 device driver for philips saa7134 based TV cards
5  *
6  * (c) 2001,02 Gerd Knorr <kraxel@bytesex.org>
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  */
22
23 #include <linux/version.h>
24 #define SAA7134_VERSION_CODE KERNEL_VERSION(0,2,13)
25
26 #include <linux/pci.h>
27 #include <linux/i2c.h>
28 #include <linux/videodev.h>
29 #include <linux/kdev_t.h>
30 #include <linux/input.h>
31
32 #include <asm/io.h>
33
34 #include <media/tuner.h>
35 #include <media/audiochip.h>
36 #include <media/id.h>
37 #include <media/ir-common.h>
38 #include <media/video-buf.h>
39 #include <media/video-buf-dvb.h>
40
41 #ifndef TRUE
42 # define TRUE (1==1)
43 #endif
44 #ifndef FALSE
45 # define FALSE (1==0)
46 #endif
47 #define UNSET (-1U)
48
49 /* 2.4 / 2.5 driver compatibility stuff */
50
51 /* ----------------------------------------------------------- */
52 /* enums                                                       */
53
54 enum saa7134_tvaudio_mode {
55         TVAUDIO_FM_MONO       = 1,
56         TVAUDIO_FM_BG_STEREO  = 2,
57         TVAUDIO_FM_SAT_STEREO = 3,
58         TVAUDIO_FM_K_STEREO   = 4,
59         TVAUDIO_NICAM_AM      = 5,
60         TVAUDIO_NICAM_FM      = 6,
61 };
62
63 enum saa7134_audio_in {
64         TV    = 1,
65         LINE1 = 2,
66         LINE2 = 3,
67         LINE2_LEFT,
68 };
69
70 enum saa7134_video_out {
71         CCIR656 = 1,
72 };
73
74 /* ----------------------------------------------------------- */
75 /* static data                                                 */
76
77 struct saa7134_tvnorm {
78         char          *name;
79         v4l2_std_id   id;
80
81         /* video decoder */
82         unsigned int  sync_control;
83         unsigned int  luma_control;
84         unsigned int  chroma_ctrl1;
85         unsigned int  chroma_gain;
86         unsigned int  chroma_ctrl2;
87         unsigned int  vgate_misc;
88
89         /* video scaler */
90         unsigned int  h_start;
91         unsigned int  h_stop;
92         unsigned int  video_v_start;
93         unsigned int  video_v_stop;
94         unsigned int  vbi_v_start_0;
95         unsigned int  vbi_v_stop_0;
96         unsigned int  src_timing;
97         unsigned int  vbi_v_start_1;
98 };
99
100 struct saa7134_tvaudio {
101         char         *name;
102         v4l2_std_id  std;
103         enum         saa7134_tvaudio_mode mode;
104         int          carr1;
105         int          carr2;
106 };
107
108 struct saa7134_format {
109         char           *name;
110         unsigned int   fourcc;
111         unsigned int   depth;
112         unsigned int   pm;
113         unsigned int   vshift;   /* vertical downsampling (for planar yuv) */
114         unsigned int   hshift;   /* horizontal downsampling (for planar yuv) */
115         unsigned int   bswap:1;
116         unsigned int   wswap:1;
117         unsigned int   yuv:1;
118         unsigned int   planar:1;
119         unsigned int   uvswap:1;
120 };
121
122 /* ----------------------------------------------------------- */
123 /* card configuration                                          */
124
125 #define SAA7134_BOARD_NOAUTO        UNSET
126 #define SAA7134_BOARD_UNKNOWN           0
127 #define SAA7134_BOARD_PROTEUS_PRO       1
128 #define SAA7134_BOARD_FLYVIDEO3000      2
129 #define SAA7134_BOARD_FLYVIDEO2000      3
130 #define SAA7134_BOARD_EMPRESS           4
131 #define SAA7134_BOARD_MONSTERTV         5
132 #define SAA7134_BOARD_MD9717            6
133 #define SAA7134_BOARD_TVSTATION_RDS     7
134 #define SAA7134_BOARD_CINERGY400        8
135 #define SAA7134_BOARD_MD5044            9
136 #define SAA7134_BOARD_KWORLD           10
137 #define SAA7134_BOARD_CINERGY600       11
138 #define SAA7134_BOARD_MD7134           12
139 #define SAA7134_BOARD_TYPHOON_90031    13
140 #define SAA7134_BOARD_ELSA             14
141 #define SAA7134_BOARD_ELSA_500TV       15
142 #define SAA7134_BOARD_ASUSTeK_TVFM7134 16
143 #define SAA7134_BOARD_VA1000POWER      17
144 #define SAA7134_BOARD_BMK_MPEX_NOTUNER 18
145 #define SAA7134_BOARD_VIDEOMATE_TV     19
146 #define SAA7134_BOARD_CRONOS_PLUS      20
147 #define SAA7134_BOARD_10MOONSTVMASTER  21
148 #define SAA7134_BOARD_MD2819           22
149 #define SAA7134_BOARD_BMK_MPEX_TUNER   23
150 #define SAA7134_BOARD_TVSTATION_DVR    24
151 #define SAA7134_BOARD_ASUSTEK_TVFM7133  25
152 #define SAA7134_BOARD_PINNACLE_PCTV_STEREO 26
153 #define SAA7134_BOARD_MANLI_MTV002     27
154 #define SAA7134_BOARD_MANLI_MTV001     28
155 #define SAA7134_BOARD_TG3000TV         29
156 #define SAA7134_BOARD_ECS_TVP3XP       30
157 #define SAA7134_BOARD_ECS_TVP3XP_4CB5  31
158 #define SAA7134_BOARD_AVACSSMARTTV     32
159 #define SAA7134_BOARD_AVERMEDIA_DVD_EZMAKER 33
160 #define SAA7134_BOARD_NOVAC_PRIMETV7133 34
161 #define SAA7134_BOARD_AVERMEDIA_STUDIO_305 35
162 #define SAA7133_BOARD_UPMOST_PURPLE_TV 36
163 #define SAA7134_BOARD_ITEMS_MTV005     37
164 #define SAA7134_BOARD_CINERGY200       38
165 #define SAA7134_BOARD_FLYTVPLATINUM_MINI 39
166 #define SAA7134_BOARD_VIDEOMATE_TV_PVR 40
167 #define SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUS 41
168 #define SAA7134_BOARD_SABRENT_SBTTVFM  42
169 #define SAA7134_BOARD_ZOLID_XPERT_TV7134 43
170 #define SAA7134_BOARD_EMPIRE_PCI_TV_RADIO_LE 44
171 #define SAA7134_BOARD_AVERMEDIA_STUDIO_307    45
172 #define SAA7134_BOARD_AVERMEDIA_CARDBUS 46
173 #define SAA7134_BOARD_CINERGY400_CARDBUS 47
174 #define SAA7134_BOARD_CINERGY600_MK3   48
175 #define SAA7134_BOARD_VIDEOMATE_GOLD_PLUS 49
176 #define SAA7134_BOARD_PINNACLE_300I_DVBT_PAL 50
177 #define SAA7134_BOARD_PROVIDEO_PV952   51
178 #define SAA7134_BOARD_AVERMEDIA_305    52
179 #define SAA7135_BOARD_ASUSTeK_TVFM7135 53
180 #define SAA7134_BOARD_FLYTVPLATINUM_FM 54
181 #define SAA7134_BOARD_FLYDVBTDUO 55
182 #define SAA7134_BOARD_AVERMEDIA_307    56
183 #define SAA7134_BOARD_AVERMEDIA_GO_007_FM 57
184 #define SAA7134_BOARD_ADS_INSTANT_TV 58
185 #define SAA7134_BOARD_KWORLD_VSTREAM_XPERT 59
186
187 #define SAA7134_MAXBOARDS 8
188 #define SAA7134_INPUT_MAX 8
189
190 struct saa7134_input {
191         char                    *name;
192         unsigned int            vmux;
193         enum saa7134_audio_in   amux;
194         unsigned int            gpio;
195         unsigned int            tv:1;
196 };
197
198 enum saa7134_mpeg_type {
199         SAA7134_MPEG_UNUSED,
200         SAA7134_MPEG_EMPRESS,
201         SAA7134_MPEG_DVB,
202 };
203
204 struct saa7134_board {
205         char                    *name;
206         unsigned int            audio_clock;
207
208         /* input switching */
209         unsigned int            gpiomask;
210         struct saa7134_input    inputs[SAA7134_INPUT_MAX];
211         struct saa7134_input    radio;
212         struct saa7134_input    mute;
213
214         /* i2c chip info */
215         unsigned int            tuner_type;
216         unsigned int            tda9887_conf;
217
218         /* peripheral I/O */
219         enum saa7134_video_out  video_out;
220         enum saa7134_mpeg_type  mpeg;
221 };
222
223 #define card_has_radio(dev)   (NULL != saa7134_boards[dev->board].radio.name)
224 #define card_is_empress(dev)  (SAA7134_MPEG_EMPRESS == saa7134_boards[dev->board].mpeg)
225 #define card_is_dvb(dev)      (SAA7134_MPEG_DVB     == saa7134_boards[dev->board].mpeg)
226 #define card_has_mpeg(dev)    (SAA7134_MPEG_UNUSED  != saa7134_boards[dev->board].mpeg)
227 #define card(dev)             (saa7134_boards[dev->board])
228 #define card_in(dev,n)        (saa7134_boards[dev->board].inputs[n])
229
230 /* ----------------------------------------------------------- */
231 /* device / file handle status                                 */
232
233 #define RESOURCE_OVERLAY       1
234 #define RESOURCE_VIDEO         2
235 #define RESOURCE_VBI           4
236
237 #define INTERLACE_AUTO         0
238 #define INTERLACE_ON           1
239 #define INTERLACE_OFF          2
240
241 #define BUFFER_TIMEOUT     (HZ/2)  /* 0.5 seconds */
242
243 struct saa7134_dev;
244 struct saa7134_dma;
245
246 /* saa7134 page table */
247 struct saa7134_pgtable {
248         unsigned int               size;
249         __le32                     *cpu;
250         dma_addr_t                 dma;
251 };
252
253 /* tvaudio thread status */
254 struct saa7134_thread {
255         pid_t                      pid;
256         struct completion          exit;
257         wait_queue_head_t          wq;
258         unsigned int               shutdown;
259         unsigned int               scan1;
260         unsigned int               scan2;
261         unsigned int               mode;
262 };
263
264 /* buffer for one video/vbi/ts frame */
265 struct saa7134_buf {
266         /* common v4l buffer stuff -- must be first */
267         struct videobuf_buffer vb;
268
269         /* saa7134 specific */
270         struct saa7134_format   *fmt;
271         unsigned int            top_seen;
272         int (*activate)(struct saa7134_dev *dev,
273                         struct saa7134_buf *buf,
274                         struct saa7134_buf *next);
275
276         /* page tables */
277         struct saa7134_pgtable  *pt;
278 };
279
280 struct saa7134_dmaqueue {
281         struct saa7134_dev         *dev;
282         struct saa7134_buf         *curr;
283         struct list_head           queue;
284         struct timer_list          timeout;
285         unsigned int               need_two;
286 };
287
288 /* video filehandle status */
289 struct saa7134_fh {
290         struct saa7134_dev         *dev;
291         unsigned int               radio;
292         enum v4l2_buf_type         type;
293         unsigned int               resources;
294 #ifdef VIDIOC_G_PRIORITY
295         enum v4l2_priority         prio;
296 #endif
297
298         /* video overlay */
299         struct v4l2_window         win;
300         struct v4l2_clip           clips[8];
301         unsigned int               nclips;
302
303         /* video capture */
304         struct saa7134_format      *fmt;
305         unsigned int               width,height;
306         struct videobuf_queue      cap;
307         struct saa7134_pgtable     pt_cap;
308
309         /* vbi capture */
310         struct videobuf_queue      vbi;
311         struct saa7134_pgtable     pt_vbi;
312 };
313
314 /* oss dsp status */
315 struct saa7134_oss {
316         struct semaphore           lock;
317         int                        minor_mixer;
318         int                        minor_dsp;
319         unsigned int               users_dsp;
320
321         /* mixer */
322         enum saa7134_audio_in      input;
323         unsigned int               count;
324         unsigned int               line1;
325         unsigned int               line2;
326
327         /* dsp */
328         unsigned int               afmt;
329         unsigned int               rate;
330         unsigned int               channels;
331         unsigned int               recording_on;
332         unsigned int               dma_running;
333         unsigned int               blocks;
334         unsigned int               blksize;
335         unsigned int               bufsize;
336         struct saa7134_pgtable     pt;
337         struct videobuf_dmabuf     dma;
338         wait_queue_head_t          wq;
339         unsigned int               dma_blk;
340         unsigned int               read_offset;
341         unsigned int               read_count;
342 };
343
344 /* IR input */
345 struct saa7134_ir {
346         struct input_dev           dev;
347         struct ir_input_state      ir;
348         char                       name[32];
349         char                       phys[32];
350         u32                        mask_keycode;
351         u32                        mask_keydown;
352         u32                        mask_keyup;
353         int                        polling;
354         u32                        last_gpio;
355         struct timer_list          timer;
356 };
357
358 /* ts/mpeg status */
359 struct saa7134_ts {
360         /* TS capture */
361         struct saa7134_pgtable     pt_ts;
362         int                        nr_packets;
363         int                        nr_bufs;
364 };
365
366 /* ts/mpeg ops */
367 struct saa7134_mpeg_ops {
368         enum saa7134_mpeg_type     type;
369         struct list_head           next;
370         int                        (*init)(struct saa7134_dev *dev);
371         int                        (*fini)(struct saa7134_dev *dev);
372         void                       (*signal_change)(struct saa7134_dev *dev);
373 };
374
375 /* global device status */
376 struct saa7134_dev {
377         struct list_head           devlist;
378         struct semaphore           lock;
379         spinlock_t                 slock;
380 #ifdef VIDIOC_G_PRIORITY
381         struct v4l2_prio_state     prio;
382 #endif
383
384         /* various device info */
385         unsigned int               resources;
386         struct video_device        *video_dev;
387         struct video_device        *radio_dev;
388         struct video_device        *vbi_dev;
389         struct saa7134_oss         oss;
390
391         /* infrared remote */
392         int                        has_remote;
393         struct saa7134_ir          *remote;
394
395         /* pci i/o */
396         char                       name[32];
397         int                        nr;
398         struct pci_dev             *pci;
399         unsigned char              pci_rev,pci_lat;
400         __u32                      __iomem *lmmio;
401         __u8                       __iomem *bmmio;
402
403         /* config info */
404         unsigned int               board;
405         unsigned int               tuner_type;
406         unsigned int               tda9887_conf;
407         unsigned int               gpio_value;
408         unsigned int               irq2_mask;
409
410         /* i2c i/o */
411         struct i2c_adapter         i2c_adap;
412         struct i2c_client          i2c_client;
413         unsigned char              eedata[64];
414
415         /* video overlay */
416         struct v4l2_framebuffer    ovbuf;
417         struct saa7134_format      *ovfmt;
418         unsigned int               ovenable;
419         enum v4l2_field            ovfield;
420
421         /* video+ts+vbi capture */
422         struct saa7134_dmaqueue    video_q;
423         struct saa7134_dmaqueue    vbi_q;
424         unsigned int               video_fieldcount;
425         unsigned int               vbi_fieldcount;
426
427         /* various v4l controls */
428         struct saa7134_tvnorm      *tvnorm;              /* video */
429         struct saa7134_tvaudio     *tvaudio;
430         unsigned int               ctl_input;
431         int                        ctl_bright;
432         int                        ctl_contrast;
433         int                        ctl_hue;
434         int                        ctl_saturation;
435         int                        ctl_freq;
436         int                        ctl_mute;             /* audio */
437         int                        ctl_volume;
438         int                        ctl_invert;           /* private */
439         int                        ctl_mirror;
440         int                        ctl_y_odd;
441         int                        ctl_y_even;
442         int                        ctl_automute;
443
444         /* crop */
445         struct v4l2_rect           crop_bounds;
446         struct v4l2_rect           crop_defrect;
447         struct v4l2_rect           crop_current;
448
449         /* other global state info */
450         unsigned int               automute;
451         struct saa7134_thread      thread;
452         struct saa7134_input       *input;
453         struct saa7134_input       *hw_input;
454         unsigned int               hw_mute;
455         int                        last_carrier;
456         int                        nosignal;
457
458         /* SAA7134_MPEG_* */
459         struct saa7134_ts          ts;
460         struct saa7134_dmaqueue    ts_q;
461         struct saa7134_mpeg_ops    *mops;
462
463         /* SAA7134_MPEG_EMPRESS only */
464         struct video_device        *empress_dev;
465         struct videobuf_queue      empress_tsq;
466         unsigned int               empress_users;
467         struct work_struct         empress_workqueue;
468         int                        empress_started;
469
470         /* SAA7134_MPEG_DVB only */
471         struct videobuf_dvb        dvb;
472 };
473
474 /* ----------------------------------------------------------- */
475
476 #define saa_readl(reg)             readl(dev->lmmio + (reg))
477 #define saa_writel(reg,value)      writel((value), dev->lmmio + (reg));
478 #define saa_andorl(reg,mask,value) \
479   writel((readl(dev->lmmio+(reg)) & ~(mask)) |\
480   ((value) & (mask)), dev->lmmio+(reg))
481 #define saa_setl(reg,bit)          saa_andorl((reg),(bit),(bit))
482 #define saa_clearl(reg,bit)        saa_andorl((reg),(bit),0)
483
484 #define saa_readb(reg)             readb(dev->bmmio + (reg))
485 #define saa_writeb(reg,value)      writeb((value), dev->bmmio + (reg));
486 #define saa_andorb(reg,mask,value) \
487   writeb((readb(dev->bmmio+(reg)) & ~(mask)) |\
488   ((value) & (mask)), dev->bmmio+(reg))
489 #define saa_setb(reg,bit)          saa_andorb((reg),(bit),(bit))
490 #define saa_clearb(reg,bit)        saa_andorb((reg),(bit),0)
491
492 #define saa_wait(us) { udelay(us); }
493
494 /* ----------------------------------------------------------- */
495 /* saa7134-core.c                                              */
496
497 extern struct list_head  saa7134_devlist;
498
499 void saa7134_print_ioctl(char *name, unsigned int cmd);
500 void saa7134_track_gpio(struct saa7134_dev *dev, char *msg);
501
502 #define SAA7134_PGTABLE_SIZE 4096
503
504 int saa7134_pgtable_alloc(struct pci_dev *pci, struct saa7134_pgtable *pt);
505 int  saa7134_pgtable_build(struct pci_dev *pci, struct saa7134_pgtable *pt,
506                            struct scatterlist *list, unsigned int length,
507                            unsigned int startpage);
508 void saa7134_pgtable_free(struct pci_dev *pci, struct saa7134_pgtable *pt);
509
510 int saa7134_buffer_count(unsigned int size, unsigned int count);
511 int saa7134_buffer_startpage(struct saa7134_buf *buf);
512 unsigned long saa7134_buffer_base(struct saa7134_buf *buf);
513
514 int saa7134_buffer_queue(struct saa7134_dev *dev, struct saa7134_dmaqueue *q,
515                          struct saa7134_buf *buf);
516 void saa7134_buffer_finish(struct saa7134_dev *dev, struct saa7134_dmaqueue *q,
517                            unsigned int state);
518 void saa7134_buffer_next(struct saa7134_dev *dev, struct saa7134_dmaqueue *q);
519 void saa7134_buffer_timeout(unsigned long data);
520 void saa7134_dma_free(struct saa7134_dev *dev,struct saa7134_buf *buf);
521
522 int saa7134_set_dmabits(struct saa7134_dev *dev);
523
524 /* ----------------------------------------------------------- */
525 /* saa7134-cards.c                                             */
526
527 extern struct saa7134_board saa7134_boards[];
528 extern const unsigned int saa7134_bcount;
529 extern struct pci_device_id __devinitdata saa7134_pci_tbl[];
530
531 extern int saa7134_board_init1(struct saa7134_dev *dev);
532 extern int saa7134_board_init2(struct saa7134_dev *dev);
533
534
535 /* ----------------------------------------------------------- */
536 /* saa7134-i2c.c                                               */
537
538 int saa7134_i2c_register(struct saa7134_dev *dev);
539 int saa7134_i2c_unregister(struct saa7134_dev *dev);
540 void saa7134_i2c_call_clients(struct saa7134_dev *dev,
541                               unsigned int cmd, void *arg);
542
543
544 /* ----------------------------------------------------------- */
545 /* saa7134-video.c                                             */
546
547 extern struct video_device saa7134_video_template;
548 extern struct video_device saa7134_radio_template;
549
550 int saa7134_common_ioctl(struct saa7134_dev *dev,
551                          unsigned int cmd, void *arg);
552
553 int saa7134_video_init1(struct saa7134_dev *dev);
554 int saa7134_video_init2(struct saa7134_dev *dev);
555 int saa7134_video_fini(struct saa7134_dev *dev);
556 void saa7134_irq_video_intl(struct saa7134_dev *dev);
557 void saa7134_irq_video_done(struct saa7134_dev *dev, unsigned long status);
558
559
560 /* ----------------------------------------------------------- */
561 /* saa7134-ts.c                                                */
562
563 #define TS_PACKET_SIZE 188 /* TS packets 188 bytes */
564
565 extern struct videobuf_queue_ops saa7134_ts_qops;
566
567 int saa7134_ts_init1(struct saa7134_dev *dev);
568 int saa7134_ts_fini(struct saa7134_dev *dev);
569 void saa7134_irq_ts_done(struct saa7134_dev *dev, unsigned long status);
570
571 int saa7134_ts_register(struct saa7134_mpeg_ops *ops);
572 void saa7134_ts_unregister(struct saa7134_mpeg_ops *ops);
573
574 /* ----------------------------------------------------------- */
575 /* saa7134-vbi.c                                               */
576
577 extern struct videobuf_queue_ops saa7134_vbi_qops;
578 extern struct video_device saa7134_vbi_template;
579
580 int saa7134_vbi_init1(struct saa7134_dev *dev);
581 int saa7134_vbi_fini(struct saa7134_dev *dev);
582 void saa7134_irq_vbi_done(struct saa7134_dev *dev, unsigned long status);
583
584
585 /* ----------------------------------------------------------- */
586 /* saa7134-tvaudio.c                                           */
587
588 int saa7134_tvaudio_rx2mode(u32 rx);
589
590 void saa7134_tvaudio_setmute(struct saa7134_dev *dev);
591 void saa7134_tvaudio_setinput(struct saa7134_dev *dev,
592                               struct saa7134_input *in);
593 void saa7134_tvaudio_setvolume(struct saa7134_dev *dev, int level);
594 int saa7134_tvaudio_getstereo(struct saa7134_dev *dev);
595
596 int saa7134_tvaudio_init2(struct saa7134_dev *dev);
597 int saa7134_tvaudio_fini(struct saa7134_dev *dev);
598 int saa7134_tvaudio_do_scan(struct saa7134_dev *dev);
599
600 int saa_dsp_writel(struct saa7134_dev *dev, int reg, u32 value);
601
602 /* ----------------------------------------------------------- */
603 /* saa7134-oss.c                                               */
604
605 extern struct file_operations saa7134_dsp_fops;
606 extern struct file_operations saa7134_mixer_fops;
607
608 int saa7134_oss_init1(struct saa7134_dev *dev);
609 int saa7134_oss_fini(struct saa7134_dev *dev);
610 void saa7134_irq_oss_done(struct saa7134_dev *dev, unsigned long status);
611
612 /* ----------------------------------------------------------- */
613 /* saa7134-input.c                                             */
614
615 int  saa7134_input_init1(struct saa7134_dev *dev);
616 void saa7134_input_fini(struct saa7134_dev *dev);
617 void saa7134_input_irq(struct saa7134_dev *dev);
618
619 /*
620  * Local variables:
621  * c-basic-offset: 8
622  * End:
623  */