summaryrefslogtreecommitdiff
path: root/drivers/media/video/ivtv/ivtv-routing.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-10-30 11:50:03 +0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-26 00:01:50 +0300
commite2a1774d9c8b866db65853fd1a17e5f472dd5cf2 (patch)
treeb1269a546476bb6102b0b14c577b31ba5367df19 /drivers/media/video/ivtv/ivtv-routing.c
parent05e997197e459a03df577ba49c34c1820957ee4a (diff)
downloadlinux-e2a1774d9c8b866db65853fd1a17e5f472dd5cf2.tar.xz
V4L/DVB (6488): ivtv: add ASUS Falcon2 support
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-routing.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-routing.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/media/video/ivtv/ivtv-routing.c b/drivers/media/video/ivtv/ivtv-routing.c
index 398bd33033ed..05564919b57f 100644
--- a/drivers/media/video/ivtv/ivtv-routing.c
+++ b/drivers/media/video/ivtv/ivtv-routing.c
@@ -25,6 +25,7 @@
#include "ivtv-routing.h"
#include <media/msp3400.h>
+#include <media/m52790.h>
#include <media/upd64031a.h>
#include <media/upd64083.h>
@@ -32,28 +33,26 @@
settings. */
void ivtv_audio_set_io(struct ivtv *itv)
{
+ const struct ivtv_card_audio_input *in;
struct v4l2_routing route;
- u32 audio_input;
- int mux_input;
/* Determine which input to use */
- if (test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags)) {
- audio_input = itv->card->radio_input.audio_input;
- mux_input = itv->card->radio_input.muxer_input;
- } else {
- audio_input = itv->card->audio_inputs[itv->audio_input].audio_input;
- mux_input = itv->card->audio_inputs[itv->audio_input].muxer_input;
- }
+ if (test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags))
+ in = &itv->card->radio_input;
+ else
+ in = &itv->card->audio_inputs[itv->audio_input];
/* handle muxer chips */
- route.input = mux_input;
+ route.input = in->muxer_input;
route.output = 0;
+ if (itv->card->hw_muxer & IVTV_HW_M52790)
+ route.output = M52790_OUT_STEREO;
ivtv_i2c_hw(itv, itv->card->hw_muxer, VIDIOC_INT_S_AUDIO_ROUTING, &route);
- route.input = audio_input;
- if (itv->card->hw_audio & IVTV_HW_MSP34XX) {
+ route.input = in->audio_input;
+ route.output = 0;
+ if (itv->card->hw_audio & IVTV_HW_MSP34XX)
route.output = MSP_OUTPUT(MSP_SC_IN_DSP_SCART1);
- }
ivtv_i2c_hw(itv, itv->card->hw_audio, VIDIOC_INT_S_AUDIO_ROUTING, &route);
}