Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d2ba055d
Commit
d2ba055d
authored
Nov 04, 2007
by
Mauro Carvalho Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
V4L/DVB (6546): Add comments for the hint methods
Signed-off-by:
Mauro Carvalho Chehab
<
mchehab@infradead.org
>
parent
fad7b958
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
drivers/media/video/em28xx/em28xx-cards.c
drivers/media/video/em28xx/em28xx-cards.c
+24
-5
No files found.
drivers/media/video/em28xx/em28xx-cards.c
View file @
d2ba055d
...
...
@@ -397,11 +397,13 @@ struct usb_device_id em28xx_id_table [] = {
};
MODULE_DEVICE_TABLE
(
usb
,
em28xx_id_table
);
static
struct
em28xx_hash_table
em28xx_hash
[]
=
{
/* EEPROM hash table for devices with generic USB IDs */
static
struct
em28xx_hash_table
em28xx_eeprom_hash
[]
=
{
/* P/N: SA 60002070465 Tuner: TVF7533-MF */
{
0x6ce05a8f
,
EM2820_BOARD_PROLINK_PLAYTV_USB2
,
TUNER_YMEC_TVF_5533MF
},
};
/* I2C devicelist hash table for devices with generic USB IDs */
static
struct
em28xx_hash_table
em28xx_i2c_hash
[]
=
{
{
0xb06a32c3
,
EM2800_BOARD_TERRATEC_CINERGY_200
,
TUNER_LG_PAL_NEW_TAPC
},
{
0xf51200e3
,
EM2800_BOARD_VGEAR_POCKETTV
,
TUNER_LG_PAL_NEW_TAPC
},
...
...
@@ -484,10 +486,18 @@ static int em28xx_hint_board(struct em28xx *dev)
{
int
i
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
em28xx_hash
);
i
++
)
{
if
(
dev
->
hash
==
em28xx_hash
[
i
].
hash
)
{
dev
->
model
=
em28xx_hash
[
i
].
model
;
dev
->
tuner_type
=
em28xx_hash
[
i
].
tuner
;
/* HINT method: EEPROM
*
* This method works only for boards with eeprom.
* Uses a hash of all eeprom bytes. The hash should be
* unique for a vendor/tuner pair.
* There are a high chance that tuners for different
* video standards produce different hashes.
*/
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
em28xx_eeprom_hash
);
i
++
)
{
if
(
dev
->
hash
==
em28xx_eeprom_hash
[
i
].
hash
)
{
dev
->
model
=
em28xx_eeprom_hash
[
i
].
model
;
dev
->
tuner_type
=
em28xx_eeprom_hash
[
i
].
tuner
;
em28xx_errdev
(
"Your board has no unique USB ID.
\n
"
);
em28xx_errdev
(
"A hint were successfully done, "
...
...
@@ -504,6 +514,15 @@ static int em28xx_hint_board(struct em28xx *dev)
}
}
/* HINT method: I2C attached devices
*
* This method works for all boards.
* Uses a hash of i2c scanned devices.
* Devices with the same i2c attached chips will
* be considered equal.
* This method is less precise than the eeprom one.
*/
/* user did not request i2c scanning => do it now */
if
(
!
dev
->
i2c_hash
)
em28xx_do_i2c_scan
(
dev
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment