diff options
Diffstat (limited to 'drivers/media/video/cx88/cx88-cards.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index 1fc71a78b926..8be90ad4e910 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -30,7 +30,7 @@ | |||
30 | /* ------------------------------------------------------------------ */ | 30 | /* ------------------------------------------------------------------ */ |
31 | /* board config info */ | 31 | /* board config info */ |
32 | 32 | ||
33 | struct cx88_board cx88_boards[] = { | 33 | const struct cx88_board cx88_boards[] = { |
34 | [CX88_BOARD_UNKNOWN] = { | 34 | [CX88_BOARD_UNKNOWN] = { |
35 | .name = "UNKNOWN/GENERIC", | 35 | .name = "UNKNOWN/GENERIC", |
36 | .tuner_type = UNSET, | 36 | .tuner_type = UNSET, |
@@ -1687,12 +1687,12 @@ static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data) | |||
1687 | return; | 1687 | return; |
1688 | } | 1688 | } |
1689 | 1689 | ||
1690 | core->has_radio = 1; | 1690 | core->board.tuner_type = (eeprom_data[6] == 0x13) ? |
1691 | core->tuner_type = (eeprom_data[6] == 0x13) ? 43 : 38; | 1691 | TUNER_PHILIPS_FM1236_MK3 : TUNER_PHILIPS_FM1216ME_MK3; |
1692 | 1692 | ||
1693 | printk(KERN_INFO "%s: Leadtek Winfast 2000XP Expert config: " | 1693 | printk(KERN_INFO "%s: Leadtek Winfast 2000XP Expert config: " |
1694 | "tuner=%d, eeprom[0]=0x%02x\n", | 1694 | "tuner=%d, eeprom[0]=0x%02x\n", |
1695 | core->name, core->tuner_type, eeprom_data[0]); | 1695 | core->name, core->board.tuner_type, eeprom_data[0]); |
1696 | } | 1696 | } |
1697 | 1697 | ||
1698 | static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data) | 1698 | static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data) |
@@ -1700,9 +1700,9 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data) | |||
1700 | struct tveeprom tv; | 1700 | struct tveeprom tv; |
1701 | 1701 | ||
1702 | tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data); | 1702 | tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data); |
1703 | core->tuner_type = tv.tuner_type; | 1703 | core->board.tuner_type = tv.tuner_type; |
1704 | core->tuner_formats = tv.tuner_formats; | 1704 | core->tuner_formats = tv.tuner_formats; |
1705 | core->has_radio = tv.has_radio; | 1705 | core->board.radio.type = tv.has_radio ? CX88_RADIO : 0; |
1706 | 1706 | ||
1707 | /* Make sure we support the board model */ | 1707 | /* Make sure we support the board model */ |
1708 | switch (tv.model) | 1708 | switch (tv.model) |
@@ -1792,8 +1792,9 @@ static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data) | |||
1792 | name ? name : "unknown"); | 1792 | name ? name : "unknown"); |
1793 | if (NULL == name) | 1793 | if (NULL == name) |
1794 | return; | 1794 | return; |
1795 | core->tuner_type = gdi_tuner[eeprom_data[0x0d]].id; | 1795 | core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id; |
1796 | core->has_radio = gdi_tuner[eeprom_data[0x0d]].fm; | 1796 | core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ? |
1797 | CX88_RADIO : 0; | ||
1797 | } | 1798 | } |
1798 | 1799 | ||
1799 | /* ----------------------------------------------------------------------- */ | 1800 | /* ----------------------------------------------------------------------- */ |
@@ -1860,7 +1861,7 @@ void cx88_card_list(struct cx88_core *core, struct pci_dev *pci) | |||
1860 | 1861 | ||
1861 | void cx88_card_setup_pre_i2c(struct cx88_core *core) | 1862 | void cx88_card_setup_pre_i2c(struct cx88_core *core) |
1862 | { | 1863 | { |
1863 | switch (core->board) { | 1864 | switch (core->boardnr) { |
1864 | case CX88_BOARD_HAUPPAUGE_HVR1300: | 1865 | case CX88_BOARD_HAUPPAUGE_HVR1300: |
1865 | /* Bring the 702 demod up before i2c scanning/attach or devices are hidden */ | 1866 | /* Bring the 702 demod up before i2c scanning/attach or devices are hidden */ |
1866 | /* We leave here with the 702 on the bus */ | 1867 | /* We leave here with the 702 on the bus */ |
@@ -1883,7 +1884,7 @@ void cx88_card_setup(struct cx88_core *core) | |||
1883 | tveeprom_read(&core->i2c_client,eeprom,sizeof(eeprom)); | 1884 | tveeprom_read(&core->i2c_client,eeprom,sizeof(eeprom)); |
1884 | } | 1885 | } |
1885 | 1886 | ||
1886 | switch (core->board) { | 1887 | switch (core->boardnr) { |
1887 | case CX88_BOARD_HAUPPAUGE: | 1888 | case CX88_BOARD_HAUPPAUGE: |
1888 | case CX88_BOARD_HAUPPAUGE_ROSLYN: | 1889 | case CX88_BOARD_HAUPPAUGE_ROSLYN: |
1889 | if (0 == core->i2c_rc) | 1890 | if (0 == core->i2c_rc) |
@@ -1927,7 +1928,7 @@ void cx88_card_setup(struct cx88_core *core) | |||
1927 | msleep(1); | 1928 | msleep(1); |
1928 | cx_set(MO_GP0_IO, 0x00000101); | 1929 | cx_set(MO_GP0_IO, 0x00000101); |
1929 | if (0 == core->i2c_rc && | 1930 | if (0 == core->i2c_rc && |
1930 | core->board == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID) | 1931 | core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID) |
1931 | dvico_fusionhdtv_hybrid_init(core); | 1932 | dvico_fusionhdtv_hybrid_init(core); |
1932 | break; | 1933 | break; |
1933 | case CX88_BOARD_KWORLD_DVB_T: | 1934 | case CX88_BOARD_KWORLD_DVB_T: |
@@ -1965,14 +1966,10 @@ void cx88_card_setup(struct cx88_core *core) | |||
1965 | } | 1966 | } |
1966 | break; | 1967 | break; |
1967 | } | 1968 | } |
1968 | if (cx88_boards[core->board].radio.type == CX88_RADIO) | ||
1969 | core->has_radio = 1; | ||
1970 | } | 1969 | } |
1971 | 1970 | ||
1972 | /* ------------------------------------------------------------------ */ | 1971 | /* ------------------------------------------------------------------ */ |
1973 | 1972 | ||
1974 | EXPORT_SYMBOL(cx88_boards); | ||
1975 | |||
1976 | /* | 1973 | /* |
1977 | * Local variables: | 1974 | * Local variables: |
1978 | * c-basic-offset: 8 | 1975 | * c-basic-offset: 8 |