aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-hdw.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2009-03-06 22:48:09 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:35 -0400
commit01c59df818001b0bd3a31e2301a92a8c73bccbce (patch)
treee14e94b71dcbcfdca784cdf5a37a41224a3b2b79 /drivers/media/video/pvrusb2/pvrusb2-hdw.c
parent6f9565120f5c2944b3d31daf03a07c272e12867b (diff)
V4L/DVB (11178): pvrusb2: Make audio sample rate update into a sub-device broadcast
The pvrusb2 driver had previously been using i2c module specific calls to set the sample rate (a long long time ago this was needed). These days it is safe to use a broadcast so let's just broadcast this when communicating audio sample rate to sub-devices. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index e92ea6af8bc..8a96f260af5 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -2983,6 +2983,26 @@ static void pvr2_subdev_update(struct pvr2_hdw *hdw)
2983 v4l2_device_call_all(&hdw->v4l2_dev, 0, video, s_fmt, &fmt); 2983 v4l2_device_call_all(&hdw->v4l2_dev, 0, video, s_fmt, &fmt);
2984 } 2984 }
2985 2985
2986 if (hdw->srate_dirty) {
2987 u32 val;
2988 pvr2_trace(PVR2_TRACE_CHIPS, "subdev v4l2 set_audio %d",
2989 hdw->srate_val);
2990 switch (hdw->srate_val) {
2991 default:
2992 case V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000:
2993 val = 48000;
2994 break;
2995 case V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100:
2996 val = 44100;
2997 break;
2998 case V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000:
2999 val = 32000;
3000 break;
3001 }
3002 v4l2_device_call_all(&hdw->v4l2_dev, 0,
3003 audio, s_clock_freq, val);
3004 }
3005
2986 /* Unable to set crop parameters; there is apparently no equivalent 3006 /* Unable to set crop parameters; there is apparently no equivalent
2987 for VIDIOC_S_CROP */ 3007 for VIDIOC_S_CROP */
2988 3008