|
@@ -18,7 +18,7 @@
|
|
* along with this program; if not, write to the Free Software
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*
|
|
*
|
|
- */
|
|
|
|
|
|
+ */
|
|
|
|
|
|
#include <asm/io.h>
|
|
#include <asm/io.h>
|
|
#include <linux/delay.h>
|
|
#include <linux/delay.h>
|
|
@@ -89,7 +89,7 @@ static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
|
|
{
|
|
{
|
|
struct snd_tea575x *tea = video_drvdata(file);
|
|
struct snd_tea575x *tea = video_drvdata(file);
|
|
void __user *arg = (void __user *)data;
|
|
void __user *arg = (void __user *)data;
|
|
-
|
|
|
|
|
|
+
|
|
switch(cmd) {
|
|
switch(cmd) {
|
|
case VIDIOCGCAP:
|
|
case VIDIOCGCAP:
|
|
{
|
|
{
|
|
@@ -110,9 +110,9 @@ static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
|
|
case VIDIOCGTUNER:
|
|
case VIDIOCGTUNER:
|
|
{
|
|
{
|
|
struct video_tuner v;
|
|
struct video_tuner v;
|
|
- if (copy_from_user(&v, arg,sizeof(v))!=0)
|
|
|
|
|
|
+ if (copy_from_user(&v, arg,sizeof(v))!=0)
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
- if (v.tuner) /* Only 1 tuner */
|
|
|
|
|
|
+ if (v.tuner) /* Only 1 tuner */
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
v.rangelow = (87*16000);
|
|
v.rangelow = (87*16000);
|
|
v.rangehigh = (108*16000);
|
|
v.rangehigh = (108*16000);
|
|
@@ -144,24 +144,24 @@ static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
|
|
snd_tea575x_set_freq(tea);
|
|
snd_tea575x_set_freq(tea);
|
|
return 0;
|
|
return 0;
|
|
case VIDIOCGAUDIO:
|
|
case VIDIOCGAUDIO:
|
|
- {
|
|
|
|
|
|
+ {
|
|
struct video_audio v;
|
|
struct video_audio v;
|
|
memset(&v, 0, sizeof(v));
|
|
memset(&v, 0, sizeof(v));
|
|
strcpy(v.name, "Radio");
|
|
strcpy(v.name, "Radio");
|
|
if(copy_to_user(arg,&v, sizeof(v)))
|
|
if(copy_to_user(arg,&v, sizeof(v)))
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
- return 0;
|
|
|
|
|
|
+ return 0;
|
|
}
|
|
}
|
|
case VIDIOCSAUDIO:
|
|
case VIDIOCSAUDIO:
|
|
{
|
|
{
|
|
struct video_audio v;
|
|
struct video_audio v;
|
|
- if(copy_from_user(&v, arg, sizeof(v)))
|
|
|
|
- return -EFAULT;
|
|
|
|
|
|
+ if(copy_from_user(&v, arg, sizeof(v)))
|
|
|
|
+ return -EFAULT;
|
|
if (tea->ops->mute)
|
|
if (tea->ops->mute)
|
|
tea->ops->mute(tea,
|
|
tea->ops->mute(tea,
|
|
(v.flags &
|
|
(v.flags &
|
|
VIDEO_AUDIO_MUTE) ? 1 : 0);
|
|
VIDEO_AUDIO_MUTE) ? 1 : 0);
|
|
- if(v.audio)
|
|
|
|
|
|
+ if(v.audio)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -240,11 +240,11 @@ static int __init alsa_tea575x_module_init(void)
|
|
{
|
|
{
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
static void __exit alsa_tea575x_module_exit(void)
|
|
static void __exit alsa_tea575x_module_exit(void)
|
|
{
|
|
{
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
module_init(alsa_tea575x_module_init)
|
|
module_init(alsa_tea575x_module_init)
|
|
module_exit(alsa_tea575x_module_exit)
|
|
module_exit(alsa_tea575x_module_exit)
|
|
|
|
|