aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/cx25840/cx25840-core.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-01-09 15:25:41 -0200
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-09 15:25:41 -0200
commit3578d3dd0b1e468a44a76a83efe90476a854625d (patch)
tree2cd544f2aae9844821afdf90308048a800e961a1 /drivers/media/video/cx25840/cx25840-core.c
parent21fa715e67fe57e404d7f5f39b7f18016db9e4b6 (diff)
V4L/DVB (3214): Calculate the saa7115 AMCLK regs instead of using fixed values
- Calculate the audio master clock registers from the actual frequencies. This simplifies the code and it also prepares for adding CGC2 support. - VIDIOC_INT_AUDIO_CLOCK_FREQ now receives an u32 instead of an enum. It is more generic and actually easier to implement. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/video/cx25840/cx25840-core.c')
-rw-r--r--drivers/media/video/cx25840/cx25840-core.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c
index 54ffae686dc..c2c1e856aa6 100644
--- a/drivers/media/video/cx25840/cx25840-core.c
+++ b/drivers/media/video/cx25840/cx25840-core.c
@@ -802,7 +802,7 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address,
i2c_set_clientdata(client, state);
memset(state, 0, sizeof(struct cx25840_state));
state->input = CX25840_TUNER;
- state->audclk_freq = V4L2_AUDCLK_48_KHZ;
+ state->audclk_freq = 48000;
state->audio_input = AUDIO_TUNER;
state->cardtype = CARDTYPE_PVR150;
@@ -1008,13 +1008,7 @@ static void log_status(struct i2c_client *client)
cx25840_info("Specified audio input: %s\n",
state->audio_input == 0 ? "Tuner" : "External");
- switch (state->audclk_freq) {
- case V4L2_AUDCLK_441_KHZ: p = "44.1 kHz"; break;
- case V4L2_AUDCLK_48_KHZ: p = "48 kHz"; break;
- case V4L2_AUDCLK_32_KHZ: p = "32 kHz"; break;
- default: p = "undefined";
- }
- cx25840_info("Specified audioclock freq: %s\n", p);
+ cx25840_info("Specified audioclock freq: %d Hz\n", state->audclk_freq);
switch (pref_mode & 0xf) {
case 0: p = "mono/language A"; break;