diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-10 09:42:44 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:16 -0400 |
commit | 1d578540a949802eebe8655c7ef9566c85966e32 (patch) | |
tree | 1d3cf41aaab8b4e233c6020214d770209bc26066 | |
parent | 9f1a693f76700018d921cd7af86f7c994a300613 (diff) |
V4L/DVB (10921): msp3400: remove obsolete V4L1 code
There are no drivers left that call msp3400 with V4L1 commands. Remove it
from this driver.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/msp3400-driver.c | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index bca768a1f34c..204513ee3364 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c | |||
@@ -366,29 +366,6 @@ int msp_sleep(struct msp_state *state, int timeout) | |||
366 | } | 366 | } |
367 | 367 | ||
368 | /* ------------------------------------------------------------------------ */ | 368 | /* ------------------------------------------------------------------------ */ |
369 | #ifdef CONFIG_VIDEO_ALLOW_V4L1 | ||
370 | static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode) | ||
371 | { | ||
372 | if (rxsubchans == V4L2_TUNER_SUB_MONO) | ||
373 | return VIDEO_SOUND_MONO; | ||
374 | if (rxsubchans == V4L2_TUNER_SUB_STEREO) | ||
375 | return VIDEO_SOUND_STEREO; | ||
376 | if (audmode == V4L2_TUNER_MODE_LANG2) | ||
377 | return VIDEO_SOUND_LANG2; | ||
378 | return VIDEO_SOUND_LANG1; | ||
379 | } | ||
380 | |||
381 | static int msp_mode_v4l1_to_v4l2(int mode) | ||
382 | { | ||
383 | if (mode & VIDEO_SOUND_STEREO) | ||
384 | return V4L2_TUNER_MODE_STEREO; | ||
385 | if (mode & VIDEO_SOUND_LANG2) | ||
386 | return V4L2_TUNER_MODE_LANG2; | ||
387 | if (mode & VIDEO_SOUND_LANG1) | ||
388 | return V4L2_TUNER_MODE_LANG1; | ||
389 | return V4L2_TUNER_MODE_MONO; | ||
390 | } | ||
391 | #endif | ||
392 | 369 | ||
393 | static int msp_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | 370 | static int msp_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) |
394 | { | 371 | { |
@@ -482,96 +459,6 @@ static int msp_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | |||
482 | return 0; | 459 | return 0; |
483 | } | 460 | } |
484 | 461 | ||
485 | #ifdef CONFIG_VIDEO_ALLOW_V4L1 | ||
486 | static long msp_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) | ||
487 | { | ||
488 | struct msp_state *state = to_state(sd); | ||
489 | struct i2c_client *client = v4l2_get_subdevdata(sd); | ||
490 | |||
491 | switch (cmd) { | ||
492 | /* --- v4l ioctls --- */ | ||
493 | /* take care: bttv does userspace copying, we'll get a | ||
494 | kernel pointer here... */ | ||
495 | case VIDIOCGAUDIO: | ||
496 | { | ||
497 | struct video_audio *va = arg; | ||
498 | |||
499 | va->flags |= VIDEO_AUDIO_VOLUME | VIDEO_AUDIO_MUTABLE; | ||
500 | if (state->has_sound_processing) | ||
501 | va->flags |= VIDEO_AUDIO_BALANCE | | ||
502 | VIDEO_AUDIO_BASS | | ||
503 | VIDEO_AUDIO_TREBLE; | ||
504 | if (state->muted) | ||
505 | va->flags |= VIDEO_AUDIO_MUTE; | ||
506 | va->volume = state->volume; | ||
507 | va->balance = state->volume ? state->balance : 32768; | ||
508 | va->bass = state->bass; | ||
509 | va->treble = state->treble; | ||
510 | |||
511 | if (state->radio) | ||
512 | break; | ||
513 | if (state->opmode == OPMODE_AUTOSELECT) | ||
514 | msp_detect_stereo(client); | ||
515 | va->mode = msp_mode_v4l2_to_v4l1(state->rxsubchans, state->audmode); | ||
516 | break; | ||
517 | } | ||
518 | |||
519 | case VIDIOCSAUDIO: | ||
520 | { | ||
521 | struct video_audio *va = arg; | ||
522 | |||
523 | state->muted = (va->flags & VIDEO_AUDIO_MUTE); | ||
524 | state->volume = va->volume; | ||
525 | state->balance = va->balance; | ||
526 | state->bass = va->bass; | ||
527 | state->treble = va->treble; | ||
528 | msp_set_audio(client); | ||
529 | |||
530 | if (va->mode != 0 && state->radio == 0 && | ||
531 | state->audmode != msp_mode_v4l1_to_v4l2(va->mode)) { | ||
532 | state->audmode = msp_mode_v4l1_to_v4l2(va->mode); | ||
533 | msp_set_audmode(client); | ||
534 | } | ||
535 | break; | ||
536 | } | ||
537 | |||
538 | case VIDIOCSCHAN: | ||
539 | { | ||
540 | struct video_channel *vc = arg; | ||
541 | int update = 0; | ||
542 | v4l2_std_id std; | ||
543 | |||
544 | if (state->radio) | ||
545 | update = 1; | ||
546 | state->radio = 0; | ||
547 | if (vc->norm == VIDEO_MODE_PAL) | ||
548 | std = V4L2_STD_PAL; | ||
549 | else if (vc->norm == VIDEO_MODE_SECAM) | ||
550 | std = V4L2_STD_SECAM; | ||
551 | else | ||
552 | std = V4L2_STD_NTSC; | ||
553 | if (std != state->v4l2_std) { | ||
554 | state->v4l2_std = std; | ||
555 | update = 1; | ||
556 | } | ||
557 | if (update) | ||
558 | msp_wake_thread(client); | ||
559 | break; | ||
560 | } | ||
561 | |||
562 | case VIDIOCSFREQ: | ||
563 | { | ||
564 | /* new channel -- kick audio carrier scan */ | ||
565 | msp_wake_thread(client); | ||
566 | break; | ||
567 | } | ||
568 | default: | ||
569 | return -ENOIOCTLCMD; | ||
570 | } | ||
571 | return 0; | ||
572 | } | ||
573 | #endif | ||
574 | |||
575 | /* --- v4l2 ioctls --- */ | 462 | /* --- v4l2 ioctls --- */ |
576 | static int msp_s_radio(struct v4l2_subdev *sd) | 463 | static int msp_s_radio(struct v4l2_subdev *sd) |
577 | { | 464 | { |
@@ -822,9 +709,6 @@ static const struct v4l2_subdev_core_ops msp_core_ops = { | |||
822 | .g_ctrl = msp_g_ctrl, | 709 | .g_ctrl = msp_g_ctrl, |
823 | .s_ctrl = msp_s_ctrl, | 710 | .s_ctrl = msp_s_ctrl, |
824 | .queryctrl = msp_queryctrl, | 711 | .queryctrl = msp_queryctrl, |
825 | #ifdef CONFIG_VIDEO_ALLOW_V4L1 | ||
826 | .ioctl = msp_ioctl, | ||
827 | #endif | ||
828 | }; | 712 | }; |
829 | 713 | ||
830 | static const struct v4l2_subdev_tuner_ops msp_tuner_ops = { | 714 | static const struct v4l2_subdev_tuner_ops msp_tuner_ops = { |