Skip to contentSkip to conversation

adding common used headers

PATCH NAK Markus Rechberger 2 participants 2 messages Oct 22, 2008 – Oct 24, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 7/7 adding common used headers

adding common used headers

tunerchip.h:
just contains an internal used struct which can be used for
setting up a tuner frontend.

commit f67a44d14a847e3fcc4fd74d1660666535c26905

Author: Markus Rechberger <[email protected]>
Date:   Wed Oct 22 22:14:17 2008 +0200

adding common used headers

tunerchip.h:
just contains an internal used struct which can be used for setting up a tuner frontend.

drivers/media/video/empia/include/tunerchip.h new file +32 -0
new file mode 100644
index 0000000..75ba8e6
@@ -0,0 +1,32 @@
+#ifndef _TUNER_CHIP_H
+#define _TUNER_CHIP_H
+
+struct tuner_module {
+	void *priv;
+        int (*tuner_cmd)(struct tuner_module *client, unsigned int cmd, void *data);
+        int (*shutdown)(struct tuner_module *client);
+        int (*set_frequency)(struct tuner_module *client, unsigned long frequency_in_hz);
+        int (*get_frequency_error)(struct tuner_module *client, long *frequency_error_mhz);
+        int (*get_lock_status)(struct tuner_module *client, unsigned short int *lock_status);
+        int (*get_version)(struct tuner_module *client, unsigned char* hw_majorversion, unsigned char* hw_minorversion, unsigned char* fw_majorversion, unsigned char* fw_minorversion);
+        int (*full_scan)(struct tuner_module *client, unsigned int freq_min, unsigned int freq_max, int freq_list_size, unsigned int *freq_list, int *nb_freq_found );
+	void (*release)(struct tuner_module *client);
+};
+
+#define tuner_chip_detach(MOD) if(MOD) { \
+				MOD->release(MOD); \
+				symbol_put_addr(MOD->release); \
+			       }
+
+#define tuner_chip_attach(FUNCTION, ARGS...) ({ \
+	struct tuner_module *mod = NULL; \
+	typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
+	if (__a) {  \
+		mod=__a(ARGS); \
+		if (mod == 0) \
+			symbol_put(__a); \
+	} \
+	mod; \
+})
+
+#endif
#1 lore raw
Quoted 5 lines · On Wed, 22 Oct 2008 23:13:20 +0200 "Markus Rechberger" <[email protected]>…

adding common used headers

tunerchip.h:
just contains an internal used struct which can be used for
setting up a tuner frontend.

NACK.

This seems to be some binding for your em28xx. It is currently not needed.

Cheers,
Mauro