diff options
author | Mijhail Moreyra <mijhail.moreyra@gmail.com> | 2011-10-10 10:09:53 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-10-14 15:59:42 -0400 |
commit | 97ce5670fcee40b37f75d227ed88dcc51af63140 (patch) | |
tree | 9d1b05c9da6499e320af21f384f215d6bc674618 /drivers/media/video/cx23885 | |
parent | b12ab3f81c1ae129aae5ab0fe538ed0afd0cb7d1 (diff) |
[media] cx23885: hooks the alsa changes into the video subsystem
Signed-off-by: Mijhail Moreyra <mijhail.moreyra@gmail.com>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-video.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index 0c463f97e6c..acd6e0c2970 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c | |||
@@ -37,6 +37,8 @@ | |||
37 | #include "cx23885-ioctl.h" | 37 | #include "cx23885-ioctl.h" |
38 | #include "tuner-xc2028.h" | 38 | #include "tuner-xc2028.h" |
39 | 39 | ||
40 | #include <media/cx25840.h> | ||
41 | |||
40 | MODULE_DESCRIPTION("v4l2 driver module for cx23885 based TV cards"); | 42 | MODULE_DESCRIPTION("v4l2 driver module for cx23885 based TV cards"); |
41 | MODULE_AUTHOR("Steven Toth <stoth@linuxtv.org>"); | 43 | MODULE_AUTHOR("Steven Toth <stoth@linuxtv.org>"); |
42 | MODULE_LICENSE("GPL"); | 44 | MODULE_LICENSE("GPL"); |
@@ -884,8 +886,9 @@ static int cx23885_get_control(struct cx23885_dev *dev, | |||
884 | static int cx23885_set_control(struct cx23885_dev *dev, | 886 | static int cx23885_set_control(struct cx23885_dev *dev, |
885 | struct v4l2_control *ctl) | 887 | struct v4l2_control *ctl) |
886 | { | 888 | { |
887 | dprintk(1, "%s() calling cx25840(VIDIOC_S_CTRL)" | 889 | dprintk(1, "%s() calling cx25840(VIDIOC_S_CTRL)\n", __func__); |
888 | " (disabled - no action)\n", __func__); | 890 | call_all(dev, core, s_ctrl, ctl); |
891 | |||
889 | return 0; | 892 | return 0; |
890 | } | 893 | } |
891 | 894 | ||
@@ -1220,11 +1223,9 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
1220 | if (0 != t->index) | 1223 | if (0 != t->index) |
1221 | return -EINVAL; | 1224 | return -EINVAL; |
1222 | 1225 | ||
1226 | memset(t, 0, sizeof(*t)); | ||
1223 | strcpy(t->name, "Television"); | 1227 | strcpy(t->name, "Television"); |
1224 | t->type = V4L2_TUNER_ANALOG_TV; | 1228 | |
1225 | t->capability = V4L2_TUNER_CAP_NORM; | ||
1226 | t->rangehigh = 0xffffffffUL; | ||
1227 | t->signal = 0xffff ; /* LOCKED */ | ||
1228 | return 0; | 1229 | return 0; |
1229 | } | 1230 | } |
1230 | 1231 | ||
@@ -1237,6 +1238,8 @@ static int vidioc_s_tuner(struct file *file, void *priv, | |||
1237 | return -EINVAL; | 1238 | return -EINVAL; |
1238 | if (0 != t->index) | 1239 | if (0 != t->index) |
1239 | return -EINVAL; | 1240 | return -EINVAL; |
1241 | /* Update the A/V core */ | ||
1242 | |||
1240 | return 0; | 1243 | return 0; |
1241 | } | 1244 | } |
1242 | 1245 | ||
@@ -1438,6 +1441,9 @@ void cx23885_video_unregister(struct cx23885_dev *dev) | |||
1438 | 1441 | ||
1439 | btcx_riscmem_free(dev->pci, &dev->vidq.stopper); | 1442 | btcx_riscmem_free(dev->pci, &dev->vidq.stopper); |
1440 | } | 1443 | } |
1444 | |||
1445 | if (dev->audio_dev) | ||
1446 | cx23885_audio_finidev(dev); | ||
1441 | } | 1447 | } |
1442 | 1448 | ||
1443 | int cx23885_video_register(struct cx23885_dev *dev) | 1449 | int cx23885_video_register(struct cx23885_dev *dev) |
@@ -1504,7 +1510,6 @@ int cx23885_video_register(struct cx23885_dev *dev) | |||
1504 | } | 1510 | } |
1505 | } | 1511 | } |
1506 | 1512 | ||
1507 | |||
1508 | /* register v4l devices */ | 1513 | /* register v4l devices */ |
1509 | dev->video_dev = cx23885_vdev_init(dev, dev->pci, | 1514 | dev->video_dev = cx23885_vdev_init(dev, dev->pci, |
1510 | &cx23885_video_template, "video"); | 1515 | &cx23885_video_template, "video"); |
@@ -1517,6 +1522,10 @@ int cx23885_video_register(struct cx23885_dev *dev) | |||
1517 | } | 1522 | } |
1518 | printk(KERN_INFO "%s/0: registered device %s [v4l2]\n", | 1523 | printk(KERN_INFO "%s/0: registered device %s [v4l2]\n", |
1519 | dev->name, video_device_node_name(dev->video_dev)); | 1524 | dev->name, video_device_node_name(dev->video_dev)); |
1525 | |||
1526 | /* Register ALSA audio device */ | ||
1527 | dev->audio_dev = cx23885_audio_initdev(dev); | ||
1528 | |||
1520 | /* initial device configuration */ | 1529 | /* initial device configuration */ |
1521 | mutex_lock(&dev->lock); | 1530 | mutex_lock(&dev->lock); |
1522 | cx23885_set_tvnorm(dev, dev->tvnorm); | 1531 | cx23885_set_tvnorm(dev, dev->tvnorm); |