diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-03-11 05:12:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-24 11:49:07 -0400 |
commit | b95dd82cd1b1e81c2019effd5e012e6989622ba9 (patch) | |
tree | 8ef4f095b4f302e3caabdc0db4fd0357ad0f4111 | |
parent | 9ff76e36dc632289658e7ff65e9e5fdfe6cca905 (diff) |
[media] go7007: set up the saa7115 audio clock correctly
The s_crystal_freq operation has to be called for the saa7115 to
set up the audio clock correctly.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/staging/media/go7007/go7007-priv.h | 1 | ||||
-rw-r--r-- | drivers/staging/media/go7007/go7007-usb.c | 5 | ||||
-rw-r--r-- | drivers/staging/media/go7007/go7007-v4l2.c | 7 |
3 files changed, 12 insertions, 1 deletions
diff --git a/drivers/staging/media/go7007/go7007-priv.h b/drivers/staging/media/go7007/go7007-priv.h index a6ef67b43816..7f79cc11017c 100644 --- a/drivers/staging/media/go7007/go7007-priv.h +++ b/drivers/staging/media/go7007/go7007-priv.h | |||
@@ -60,6 +60,7 @@ struct go7007; | |||
60 | #define GO7007_SENSOR_TV (1<<7) | 60 | #define GO7007_SENSOR_TV (1<<7) |
61 | #define GO7007_SENSOR_VBI (1<<8) | 61 | #define GO7007_SENSOR_VBI (1<<8) |
62 | #define GO7007_SENSOR_SCALING (1<<9) | 62 | #define GO7007_SENSOR_SCALING (1<<9) |
63 | #define GO7007_SENSOR_SAA7115 (1<<10) | ||
63 | 64 | ||
64 | /* Characteristics of audio sensor devices */ | 65 | /* Characteristics of audio sensor devices */ |
65 | #define GO7007_AUDIO_I2S_MODE_1 (1) | 66 | #define GO7007_AUDIO_I2S_MODE_1 (1) |
diff --git a/drivers/staging/media/go7007/go7007-usb.c b/drivers/staging/media/go7007/go7007-usb.c index 53c5b16c9629..5c7a19e6fb68 100644 --- a/drivers/staging/media/go7007/go7007-usb.c +++ b/drivers/staging/media/go7007/go7007-usb.c | |||
@@ -88,6 +88,7 @@ static struct go7007_usb_board board_matrix_ii = { | |||
88 | .sensor_flags = GO7007_SENSOR_656 | | 88 | .sensor_flags = GO7007_SENSOR_656 | |
89 | GO7007_SENSOR_VALID_ENABLE | | 89 | GO7007_SENSOR_VALID_ENABLE | |
90 | GO7007_SENSOR_TV | | 90 | GO7007_SENSOR_TV | |
91 | GO7007_SENSOR_SAA7115 | | ||
91 | GO7007_SENSOR_VBI | | 92 | GO7007_SENSOR_VBI | |
92 | GO7007_SENSOR_SCALING, | 93 | GO7007_SENSOR_SCALING, |
93 | .num_i2c_devs = 1, | 94 | .num_i2c_devs = 1, |
@@ -131,7 +132,7 @@ static struct go7007_usb_board board_matrix_reload = { | |||
131 | .num_i2c_devs = 1, | 132 | .num_i2c_devs = 1, |
132 | .i2c_devs = { | 133 | .i2c_devs = { |
133 | { | 134 | { |
134 | .type = "saa7115", | 135 | .type = "saa7113", |
135 | .addr = 0x25, | 136 | .addr = 0x25, |
136 | .is_video = 1, | 137 | .is_video = 1, |
137 | }, | 138 | }, |
@@ -160,6 +161,7 @@ static struct go7007_usb_board board_star_trek = { | |||
160 | .sensor_flags = GO7007_SENSOR_656 | | 161 | .sensor_flags = GO7007_SENSOR_656 | |
161 | GO7007_SENSOR_VALID_ENABLE | | 162 | GO7007_SENSOR_VALID_ENABLE | |
162 | GO7007_SENSOR_TV | | 163 | GO7007_SENSOR_TV | |
164 | GO7007_SENSOR_SAA7115 | | ||
163 | GO7007_SENSOR_VBI | | 165 | GO7007_SENSOR_VBI | |
164 | GO7007_SENSOR_SCALING, | 166 | GO7007_SENSOR_SCALING, |
165 | .audio_flags = GO7007_AUDIO_I2S_MODE_1 | | 167 | .audio_flags = GO7007_AUDIO_I2S_MODE_1 | |
@@ -207,6 +209,7 @@ static struct go7007_usb_board board_px_tv402u = { | |||
207 | .sensor_flags = GO7007_SENSOR_656 | | 209 | .sensor_flags = GO7007_SENSOR_656 | |
208 | GO7007_SENSOR_VALID_ENABLE | | 210 | GO7007_SENSOR_VALID_ENABLE | |
209 | GO7007_SENSOR_TV | | 211 | GO7007_SENSOR_TV | |
212 | GO7007_SENSOR_SAA7115 | | ||
210 | GO7007_SENSOR_VBI | | 213 | GO7007_SENSOR_VBI | |
211 | GO7007_SENSOR_SCALING, | 214 | GO7007_SENSOR_SCALING, |
212 | .audio_flags = GO7007_AUDIO_I2S_MODE_1 | | 215 | .audio_flags = GO7007_AUDIO_I2S_MODE_1 | |
diff --git a/drivers/staging/media/go7007/go7007-v4l2.c b/drivers/staging/media/go7007/go7007-v4l2.c index 4d9a99832d7e..824b7e5018e1 100644 --- a/drivers/staging/media/go7007/go7007-v4l2.c +++ b/drivers/staging/media/go7007/go7007-v4l2.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <media/v4l2-ioctl.h> | 35 | #include <media/v4l2-ioctl.h> |
36 | #include <media/v4l2-subdev.h> | 36 | #include <media/v4l2-subdev.h> |
37 | #include <media/v4l2-event.h> | 37 | #include <media/v4l2-event.h> |
38 | #include <media/saa7115.h> | ||
38 | 39 | ||
39 | #include "go7007.h" | 40 | #include "go7007.h" |
40 | #include "go7007-priv.h" | 41 | #include "go7007-priv.h" |
@@ -1461,6 +1462,12 @@ int go7007_v4l2_init(struct go7007 *go) | |||
1461 | v4l2_disable_ioctl(go->video_dev, VIDIOC_S_AUDIO); | 1462 | v4l2_disable_ioctl(go->video_dev, VIDIOC_S_AUDIO); |
1462 | v4l2_disable_ioctl(go->video_dev, VIDIOC_ENUMAUDIO); | 1463 | v4l2_disable_ioctl(go->video_dev, VIDIOC_ENUMAUDIO); |
1463 | } | 1464 | } |
1465 | /* Setup correct crystal frequency on this board */ | ||
1466 | if (go->board_info->sensor_flags & GO7007_SENSOR_SAA7115) | ||
1467 | v4l2_subdev_call(go->sd_video, video, s_crystal_freq, | ||
1468 | SAA7115_FREQ_24_576_MHZ, | ||
1469 | SAA7115_FREQ_FL_APLL | SAA7115_FREQ_FL_UCGC | | ||
1470 | SAA7115_FREQ_FL_DOUBLE_ASCLK); | ||
1464 | go7007_s_input(go); | 1471 | go7007_s_input(go); |
1465 | if (go->board_info->sensor_flags & GO7007_SENSOR_TV) | 1472 | if (go->board_info->sensor_flags & GO7007_SENSOR_TV) |
1466 | go7007_s_std(go); | 1473 | go7007_s_std(go); |