diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-05-17 07:08:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-06-08 07:21:19 -0400 |
commit | f2100d82b858815848b661d57d7e166341c02e20 (patch) | |
tree | 273413b1d935bf9e917ab72c5c9fd144b086f4a6 | |
parent | b6cfe6af6bfb101212b217cba55012d1d35ab3a8 (diff) |
V4L/DVB (5673): Fix audio stuttering for saa711x/ivtv when in radio mode.
Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/ivtv/ivtv-fileops.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index 8976487a65f3..555d5e6369c3 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c | |||
@@ -32,6 +32,8 @@ | |||
32 | #include "ivtv-yuv.h" | 32 | #include "ivtv-yuv.h" |
33 | #include "ivtv-controls.h" | 33 | #include "ivtv-controls.h" |
34 | #include "ivtv-ioctl.h" | 34 | #include "ivtv-ioctl.h" |
35 | #include "ivtv-cards.h" | ||
36 | #include <media/saa7115.h> | ||
35 | 37 | ||
36 | /* This function tries to claim the stream for a specific file descriptor. | 38 | /* This function tries to claim the stream for a specific file descriptor. |
37 | If no one else is using this stream then the stream is claimed and | 39 | If no one else is using this stream then the stream is claimed and |
@@ -786,6 +788,13 @@ int ivtv_v4l2_close(struct inode *inode, struct file *filp) | |||
786 | ivtv_call_i2c_clients(itv, VIDIOC_S_STD, &itv->std); | 788 | ivtv_call_i2c_clients(itv, VIDIOC_S_STD, &itv->std); |
787 | /* Select correct audio input (i.e. TV tuner or Line in) */ | 789 | /* Select correct audio input (i.e. TV tuner or Line in) */ |
788 | ivtv_audio_set_io(itv); | 790 | ivtv_audio_set_io(itv); |
791 | if (itv->hw_flags & IVTV_HW_SAA711X) | ||
792 | { | ||
793 | struct v4l2_crystal_freq crystal_freq; | ||
794 | crystal_freq.freq = SAA7115_FREQ_32_11_MHZ; | ||
795 | crystal_freq.flags = 0; | ||
796 | ivtv_saa7115(itv, VIDIOC_INT_S_CRYSTAL_FREQ, &crystal_freq); | ||
797 | } | ||
789 | /* Done! Unmute and continue. */ | 798 | /* Done! Unmute and continue. */ |
790 | ivtv_unmute(itv); | 799 | ivtv_unmute(itv); |
791 | ivtv_release_stream(s); | 800 | ivtv_release_stream(s); |
@@ -872,6 +881,13 @@ int ivtv_v4l2_open(struct inode *inode, struct file *filp) | |||
872 | set_bit(IVTV_F_I_RADIO_USER, &itv->i_flags); | 881 | set_bit(IVTV_F_I_RADIO_USER, &itv->i_flags); |
873 | /* Select the correct audio input (i.e. radio tuner) */ | 882 | /* Select the correct audio input (i.e. radio tuner) */ |
874 | ivtv_audio_set_io(itv); | 883 | ivtv_audio_set_io(itv); |
884 | if (itv->hw_flags & IVTV_HW_SAA711X) | ||
885 | { | ||
886 | struct v4l2_crystal_freq crystal_freq; | ||
887 | crystal_freq.freq = SAA7115_FREQ_32_11_MHZ; | ||
888 | crystal_freq.flags = SAA7115_FREQ_FL_APLL; | ||
889 | ivtv_saa7115(itv, VIDIOC_INT_S_CRYSTAL_FREQ, &crystal_freq); | ||
890 | } | ||
875 | /* Done! Unmute and continue. */ | 891 | /* Done! Unmute and continue. */ |
876 | ivtv_unmute(itv); | 892 | ivtv_unmute(itv); |
877 | } | 893 | } |