summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tvaudio.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-03-19 16:35:57 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2006-03-19 16:35:57 +0100
commitfde3e3b6816368fa44ece4a962fd3ef5ed664398 (patch)
tree22004efc3fe8489597fae89142217965b630f2b9 /linux/drivers/media/video/tvaudio.c
parenta54e9c36217d11493c90e0dbdef2f48625525702 (diff)
downloadmediapointer-dvb-s2-fde3e3b6816368fa44ece4a962fd3ef5ed664398.tar.gz
mediapointer-dvb-s2-fde3e3b6816368fa44ece4a962fd3ef5ed664398.tar.bz2
Implement correct msp3400 input/output routing
From: Hans Verkuil <hverkuil@xs4all.nl> - 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>
Diffstat (limited to 'linux/drivers/media/video/tvaudio.c')
-rw-r--r--linux/drivers/media/video/tvaudio.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c
index 0e6dea55c..d989d891f 100644
--- a/linux/drivers/media/video/tvaudio.c
+++ b/linux/drivers/media/video/tvaudio.c
@@ -1723,6 +1723,30 @@ static int chip_command(struct i2c_client *client,
case VIDIOC_S_CTRL:
return tvaudio_set_ctrl(chip, arg);
+ case VIDIOC_INT_G_AUDIO_ROUTING:
+ {
+ struct v4l2_routing *rt = arg;
+
+ rt->input = chip->input;
+ rt->output = 0;
+ break;
+ }
+
+ case VIDIOC_INT_S_AUDIO_ROUTING:
+ {
+ struct v4l2_routing *rt = arg;
+
+ if (!(desc->flags & CHIP_HAS_INPUTSEL) || rt->input >= 4)
+ return -EINVAL;
+ /* There are four inputs: tuner, radio, extern and intern. */
+ chip->input = rt->input;
+ if (chip->muted)
+ break;
+ chip_write_masked(chip, desc->inputreg,
+ desc->inputmap[chip->input], desc->inputmask);
+ break;
+ }
+
case VIDIOC_S_AUDIO:
{
struct v4l2_audio *sarg = arg;