diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-02-06 15:43:37 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-05 17:23:37 (GMT) |
commit | fafdc26b8558838988f406abef27d6dcc5b3dd76 (patch) | |
tree | ff060dddb23c25701f1bcf7fa644b3b3205c7771 /drivers/media/pci/bt8xx/bttv-cards.c | |
parent | 6795cc55506606988175c16aa0e17d9f349706ca (diff) | |
download | linux-fafdc26b8558838988f406abef27d6dcc5b3dd76.tar.xz |
[media] bttv: there may be multiple tvaudio/tda7432 devices
Probe for additional tvaudio devices, and allow tvaudio+tda7432 to
co-exist. My STB TV PCI FM bttv card has a tda7432, a tda9850 and a
tea6420 and with this patch it finally works again (probably for the
first time in many years).
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci/bt8xx/bttv-cards.c')
-rw-r--r-- | drivers/media/pci/bt8xx/bttv-cards.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-cards.c b/drivers/media/pci/bt8xx/bttv-cards.c index 682ed89..fa0faaa 100644 --- a/drivers/media/pci/bt8xx/bttv-cards.c +++ b/drivers/media/pci/bt8xx/bttv-cards.c @@ -3547,6 +3547,16 @@ void bttv_init_card2(struct bttv *btv) if (btv->sd_msp34xx) return; + /* Now see if we can find one of the tvaudio devices. */ + btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, + &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); + if (btv->sd_tvaudio) { + /* There may be two tvaudio chips on the card, so try to + find another. */ + v4l2_i2c_new_subdev(&btv->c.v4l2_dev, + &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); + } + /* it might also be a tda7432. */ if (!bttv_tvcards[btv->c.type].no_tda7432) { static const unsigned short addrs[] = { @@ -3559,10 +3569,6 @@ void bttv_init_card2(struct bttv *btv) if (btv->sd_tda7432) return; } - - /* Now see if we can find one of the tvaudio devices. */ - btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, - &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); if (btv->sd_tvaudio) return; |