aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tvaudio.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-03-19 10:35:57 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-03-24 14:26:57 -0500
commit2474ed444b475614ef795523076be7cc8437ae00 (patch)
tree87808b3c7ff145b63a638e6e42ffce9db7db1b8c /drivers/media/video/tvaudio.c
parent49965a80a4c4f5cbe15fb3bb1f8f8b0ec4ef02bc (diff)
V4L/DVB (3582): Implement correct msp3400 input/output routing
- implement VIDIOC_INT_S_AUDIO_ROUTING for msp3400 and tvaudio - use the new command in bttv, pvrusb2 and em28xx. - remove the now obsolete MSP_SET_MATRIX from msp3400 (yeah!) - remove the obsolete VIDIOC_S_AUDIO from msp3400. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tvaudio.c')
-rw-r--r--drivers/media/video/tvaudio.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
index 15fd55ff69ca..4e6d030d83c0 100644
--- a/drivers/media/video/tvaudio.c
+++ b/drivers/media/video/tvaudio.c
@@ -1682,6 +1682,30 @@ static int chip_command(struct i2c_client *client,
1682 case VIDIOC_S_CTRL: 1682 case VIDIOC_S_CTRL:
1683 return tvaudio_set_ctrl(chip, arg); 1683 return tvaudio_set_ctrl(chip, arg);
1684 1684
1685 case VIDIOC_INT_G_AUDIO_ROUTING:
1686 {
1687 struct v4l2_routing *rt = arg;
1688
1689 rt->input = chip->input;
1690 rt->output = 0;
1691 break;
1692 }
1693
1694 case VIDIOC_INT_S_AUDIO_ROUTING:
1695 {
1696 struct v4l2_routing *rt = arg;
1697
1698 if (!(desc->flags & CHIP_HAS_INPUTSEL) || rt->input >= 4)
1699 return -EINVAL;
1700 /* There are four inputs: tuner, radio, extern and intern. */
1701 chip->input = rt->input;
1702 if (chip->muted)
1703 break;
1704 chip_write_masked(chip, desc->inputreg,
1705 desc->inputmap[chip->input], desc->inputmask);
1706 break;
1707 }
1708
1685 case VIDIOC_S_AUDIO: 1709 case VIDIOC_S_AUDIO:
1686 { 1710 {
1687 struct v4l2_audio *sarg = arg; 1711 struct v4l2_audio *sarg = arg;