162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci *  Copyright (C) 2005 Mike Isely <isely@pobox.com>
562306a36Sopenharmony_ci */
662306a36Sopenharmony_ci#ifndef __PVRUSB2_HDW_H
762306a36Sopenharmony_ci#define __PVRUSB2_HDW_H
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#include <linux/usb.h>
1062306a36Sopenharmony_ci#include <linux/videodev2.h>
1162306a36Sopenharmony_ci#include <media/v4l2-dev.h>
1262306a36Sopenharmony_ci#include "pvrusb2-io.h"
1362306a36Sopenharmony_ci#include "pvrusb2-ctrl.h"
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci/* Private internal control ids, look these up with
1762306a36Sopenharmony_ci   pvr2_hdw_get_ctrl_by_id() - these are NOT visible in V4L */
1862306a36Sopenharmony_ci#define PVR2_CID_STDCUR 2
1962306a36Sopenharmony_ci#define PVR2_CID_STDAVAIL 3
2062306a36Sopenharmony_ci#define PVR2_CID_INPUT 4
2162306a36Sopenharmony_ci#define PVR2_CID_AUDIOMODE 5
2262306a36Sopenharmony_ci#define PVR2_CID_FREQUENCY 6
2362306a36Sopenharmony_ci#define PVR2_CID_HRES 7
2462306a36Sopenharmony_ci#define PVR2_CID_VRES 8
2562306a36Sopenharmony_ci#define PVR2_CID_CROPL 9
2662306a36Sopenharmony_ci#define PVR2_CID_CROPT 10
2762306a36Sopenharmony_ci#define PVR2_CID_CROPW 11
2862306a36Sopenharmony_ci#define PVR2_CID_CROPH 12
2962306a36Sopenharmony_ci#define PVR2_CID_CROPCAPPAN 13
3062306a36Sopenharmony_ci#define PVR2_CID_CROPCAPPAD 14
3162306a36Sopenharmony_ci#define PVR2_CID_CROPCAPBL 15
3262306a36Sopenharmony_ci#define PVR2_CID_CROPCAPBT 16
3362306a36Sopenharmony_ci#define PVR2_CID_CROPCAPBW 17
3462306a36Sopenharmony_ci#define PVR2_CID_CROPCAPBH 18
3562306a36Sopenharmony_ci#define PVR2_CID_STDDETECT 19
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci/* Legal values for the INPUT state variable */
3862306a36Sopenharmony_ci#define PVR2_CVAL_INPUT_TV 0
3962306a36Sopenharmony_ci#define PVR2_CVAL_INPUT_DTV 1
4062306a36Sopenharmony_ci#define PVR2_CVAL_INPUT_COMPOSITE 2
4162306a36Sopenharmony_ci#define PVR2_CVAL_INPUT_SVIDEO 3
4262306a36Sopenharmony_ci#define PVR2_CVAL_INPUT_RADIO 4
4362306a36Sopenharmony_ci#define PVR2_CVAL_INPUT_MAX PVR2_CVAL_INPUT_RADIO
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_cienum pvr2_config {
4662306a36Sopenharmony_ci	pvr2_config_empty,    /* No configuration */
4762306a36Sopenharmony_ci	pvr2_config_mpeg,     /* Encoded / compressed video */
4862306a36Sopenharmony_ci	pvr2_config_vbi,      /* Standard vbi info */
4962306a36Sopenharmony_ci	pvr2_config_pcm,      /* Audio raw pcm stream */
5062306a36Sopenharmony_ci	pvr2_config_rawvideo, /* Video raw frames */
5162306a36Sopenharmony_ci};
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_cienum pvr2_v4l_type {
5462306a36Sopenharmony_ci	pvr2_v4l_type_video,
5562306a36Sopenharmony_ci	pvr2_v4l_type_vbi,
5662306a36Sopenharmony_ci	pvr2_v4l_type_radio,
5762306a36Sopenharmony_ci};
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci/* Major states that we can be in:
6062306a36Sopenharmony_ci *
6162306a36Sopenharmony_ci *  DEAD - Device is in an unusable state and cannot be recovered.  This
6262306a36Sopenharmony_ci *  can happen if we completely lose the ability to communicate with it
6362306a36Sopenharmony_ci *  (but it might still on the bus).  In this state there's nothing we can
6462306a36Sopenharmony_ci *  do; it must be replugged in order to recover.
6562306a36Sopenharmony_ci *
6662306a36Sopenharmony_ci *  COLD - Device is in an unusable state, needs microcontroller firmware.
6762306a36Sopenharmony_ci *
6862306a36Sopenharmony_ci *  WARM - We can communicate with the device and the proper
6962306a36Sopenharmony_ci *  microcontroller firmware is running, but other device initialization is
7062306a36Sopenharmony_ci *  still needed (e.g. encoder firmware).
7162306a36Sopenharmony_ci *
7262306a36Sopenharmony_ci *  ERROR - A problem prevents capture operation (e.g. encoder firmware
7362306a36Sopenharmony_ci *  missing).
7462306a36Sopenharmony_ci *
7562306a36Sopenharmony_ci *  READY - Device is operational, but not streaming.
7662306a36Sopenharmony_ci *
7762306a36Sopenharmony_ci *  RUN - Device is streaming.
7862306a36Sopenharmony_ci *
7962306a36Sopenharmony_ci */
8062306a36Sopenharmony_ci#define PVR2_STATE_NONE 0
8162306a36Sopenharmony_ci#define PVR2_STATE_DEAD 1
8262306a36Sopenharmony_ci#define PVR2_STATE_COLD 2
8362306a36Sopenharmony_ci#define PVR2_STATE_WARM 3
8462306a36Sopenharmony_ci#define PVR2_STATE_ERROR 4
8562306a36Sopenharmony_ci#define PVR2_STATE_READY 5
8662306a36Sopenharmony_ci#define PVR2_STATE_RUN 6
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ci/* Translate configuration enum to a string label */
8962306a36Sopenharmony_ciconst char *pvr2_config_get_name(enum pvr2_config);
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_cistruct pvr2_hdw;
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci/* Create and return a structure for interacting with the underlying
9462306a36Sopenharmony_ci   hardware */
9562306a36Sopenharmony_cistruct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
9662306a36Sopenharmony_ci				 const struct usb_device_id *devid);
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci/* Perform second stage initialization, passing in a notification callback
9962306a36Sopenharmony_ci   for when the master state changes. */
10062306a36Sopenharmony_ciint pvr2_hdw_initialize(struct pvr2_hdw *,
10162306a36Sopenharmony_ci			void (*callback_func)(void *),
10262306a36Sopenharmony_ci			void *callback_data);
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ci/* Destroy hardware interaction structure */
10562306a36Sopenharmony_civoid pvr2_hdw_destroy(struct pvr2_hdw *);
10662306a36Sopenharmony_ci
10762306a36Sopenharmony_ci/* Return true if in the ready (normal) state */
10862306a36Sopenharmony_ciint pvr2_hdw_dev_ok(struct pvr2_hdw *);
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ci/* Return small integer number [1..N] for logical instance number of this
11162306a36Sopenharmony_ci   device.  This is useful for indexing array-valued module parameters. */
11262306a36Sopenharmony_ciint pvr2_hdw_get_unit_number(struct pvr2_hdw *);
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ci/* Get pointer to underlying USB device */
11562306a36Sopenharmony_cistruct usb_device *pvr2_hdw_get_dev(struct pvr2_hdw *);
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ci/* Retrieve serial number of device */
11862306a36Sopenharmony_ciunsigned long pvr2_hdw_get_sn(struct pvr2_hdw *);
11962306a36Sopenharmony_ci
12062306a36Sopenharmony_ci/* Retrieve bus location info of device */
12162306a36Sopenharmony_ciconst char *pvr2_hdw_get_bus_info(struct pvr2_hdw *);
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_ci/* Retrieve per-instance string identifier for this specific device */
12462306a36Sopenharmony_ciconst char *pvr2_hdw_get_device_identifier(struct pvr2_hdw *);
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ci/* Called when hardware has been unplugged */
12762306a36Sopenharmony_civoid pvr2_hdw_disconnect(struct pvr2_hdw *);
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_ci/* Sets v4l2_dev of a video_device struct */
13062306a36Sopenharmony_civoid pvr2_hdw_set_v4l2_dev(struct pvr2_hdw *, struct video_device *);
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ci/* Get the number of defined controls */
13362306a36Sopenharmony_ciunsigned int pvr2_hdw_get_ctrl_count(struct pvr2_hdw *);
13462306a36Sopenharmony_ci
13562306a36Sopenharmony_ci/* Retrieve a control handle given its index (0..count-1) */
13662306a36Sopenharmony_cistruct pvr2_ctrl *pvr2_hdw_get_ctrl_by_index(struct pvr2_hdw *,unsigned int);
13762306a36Sopenharmony_ci
13862306a36Sopenharmony_ci/* Retrieve a control handle given its internal ID (if any) */
13962306a36Sopenharmony_cistruct pvr2_ctrl *pvr2_hdw_get_ctrl_by_id(struct pvr2_hdw *,unsigned int);
14062306a36Sopenharmony_ci
14162306a36Sopenharmony_ci/* Retrieve a control handle given its V4L ID (if any) */
14262306a36Sopenharmony_cistruct pvr2_ctrl *pvr2_hdw_get_ctrl_v4l(struct pvr2_hdw *,unsigned int ctl_id);
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ci/* Retrieve a control handle given its immediate predecessor V4L ID (if any) */
14562306a36Sopenharmony_cistruct pvr2_ctrl *pvr2_hdw_get_ctrl_nextv4l(struct pvr2_hdw *,
14662306a36Sopenharmony_ci					    unsigned int ctl_id);
14762306a36Sopenharmony_ci
14862306a36Sopenharmony_ci/* Commit all control changes made up to this point */
14962306a36Sopenharmony_ciint pvr2_hdw_commit_ctl(struct pvr2_hdw *);
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_ci/* Return a bit mask of valid input selections for this device.  Mask bits
15262306a36Sopenharmony_ci * will be according to PVR_CVAL_INPUT_xxxx definitions. */
15362306a36Sopenharmony_ciunsigned int pvr2_hdw_get_input_available(struct pvr2_hdw *);
15462306a36Sopenharmony_ci
15562306a36Sopenharmony_ci/* Return a bit mask of allowed input selections for this device.  Mask bits
15662306a36Sopenharmony_ci * will be according to PVR_CVAL_INPUT_xxxx definitions. */
15762306a36Sopenharmony_ciunsigned int pvr2_hdw_get_input_allowed(struct pvr2_hdw *);
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ci/* Change the set of allowed input selections for this device.  Both
16062306a36Sopenharmony_ci   change_mask and change_valu are mask bits according to
16162306a36Sopenharmony_ci   PVR_CVAL_INPUT_xxxx definitions.  The change_mask parameter indicate
16262306a36Sopenharmony_ci   which settings are being changed and the change_val parameter indicates
16362306a36Sopenharmony_ci   whether corresponding settings are being set or cleared. */
16462306a36Sopenharmony_ciint pvr2_hdw_set_input_allowed(struct pvr2_hdw *,
16562306a36Sopenharmony_ci			       unsigned int change_mask,
16662306a36Sopenharmony_ci			       unsigned int change_val);
16762306a36Sopenharmony_ci
16862306a36Sopenharmony_ci/* Return name for this driver instance */
16962306a36Sopenharmony_ciconst char *pvr2_hdw_get_driver_name(struct pvr2_hdw *);
17062306a36Sopenharmony_ci
17162306a36Sopenharmony_ci/* Mark tuner status stale so that it will be re-fetched */
17262306a36Sopenharmony_civoid pvr2_hdw_execute_tuner_poll(struct pvr2_hdw *);
17362306a36Sopenharmony_ci
17462306a36Sopenharmony_ci/* Return information about the tuner */
17562306a36Sopenharmony_ciint pvr2_hdw_get_tuner_status(struct pvr2_hdw *,struct v4l2_tuner *);
17662306a36Sopenharmony_ci
17762306a36Sopenharmony_ci/* Return information about cropping capabilities */
17862306a36Sopenharmony_ciint pvr2_hdw_get_cropcap(struct pvr2_hdw *, struct v4l2_cropcap *);
17962306a36Sopenharmony_ci
18062306a36Sopenharmony_ci/* Query device and see if it thinks it is on a high-speed USB link */
18162306a36Sopenharmony_ciint pvr2_hdw_is_hsm(struct pvr2_hdw *);
18262306a36Sopenharmony_ci
18362306a36Sopenharmony_ci/* Return a string token representative of the hardware type */
18462306a36Sopenharmony_ciconst char *pvr2_hdw_get_type(struct pvr2_hdw *);
18562306a36Sopenharmony_ci
18662306a36Sopenharmony_ci/* Return a single line description of the hardware type */
18762306a36Sopenharmony_ciconst char *pvr2_hdw_get_desc(struct pvr2_hdw *);
18862306a36Sopenharmony_ci
18962306a36Sopenharmony_ci/* Turn streaming on/off */
19062306a36Sopenharmony_ciint pvr2_hdw_set_streaming(struct pvr2_hdw *,int);
19162306a36Sopenharmony_ci
19262306a36Sopenharmony_ci/* Find out if streaming is on */
19362306a36Sopenharmony_ciint pvr2_hdw_get_streaming(struct pvr2_hdw *);
19462306a36Sopenharmony_ci
19562306a36Sopenharmony_ci/* Retrieve driver overall state */
19662306a36Sopenharmony_ciint pvr2_hdw_get_state(struct pvr2_hdw *);
19762306a36Sopenharmony_ci
19862306a36Sopenharmony_ci/* Configure the type of stream to generate */
19962306a36Sopenharmony_ciint pvr2_hdw_set_stream_type(struct pvr2_hdw *, enum pvr2_config);
20062306a36Sopenharmony_ci
20162306a36Sopenharmony_ci/* Get handle to video output stream */
20262306a36Sopenharmony_cistruct pvr2_stream *pvr2_hdw_get_video_stream(struct pvr2_hdw *);
20362306a36Sopenharmony_ci
20462306a36Sopenharmony_ci/* Enable / disable retrieval of CPU firmware or prom contents.  This must
20562306a36Sopenharmony_ci   be enabled before pvr2_hdw_cpufw_get() will function.  Note that doing
20662306a36Sopenharmony_ci   this may prevent the device from running (and leaving this mode may
20762306a36Sopenharmony_ci   imply a device reset). */
20862306a36Sopenharmony_civoid pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *,
20962306a36Sopenharmony_ci				int mode, /* 0=8KB FX2, 1=16KB FX2, 2=PROM */
21062306a36Sopenharmony_ci				int enable_flag);
21162306a36Sopenharmony_ci
21262306a36Sopenharmony_ci/* Return true if we're in a mode for retrieval CPU firmware */
21362306a36Sopenharmony_ciint pvr2_hdw_cpufw_get_enabled(struct pvr2_hdw *);
21462306a36Sopenharmony_ci
21562306a36Sopenharmony_ci/* Retrieve a piece of the CPU's firmware at the given offset.  Return
21662306a36Sopenharmony_ci   value is the number of bytes retrieved or zero if we're past the end or
21762306a36Sopenharmony_ci   an error otherwise (e.g. if firmware retrieval is not enabled). */
21862306a36Sopenharmony_ciint pvr2_hdw_cpufw_get(struct pvr2_hdw *,unsigned int offs,
21962306a36Sopenharmony_ci		       char *buf,unsigned int cnt);
22062306a36Sopenharmony_ci
22162306a36Sopenharmony_ci/* Retrieve a previously stored v4l minor device number */
22262306a36Sopenharmony_ciint pvr2_hdw_v4l_get_minor_number(struct pvr2_hdw *,enum pvr2_v4l_type index);
22362306a36Sopenharmony_ci
22462306a36Sopenharmony_ci/* Store a v4l minor device number */
22562306a36Sopenharmony_civoid pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *,
22662306a36Sopenharmony_ci				     enum pvr2_v4l_type index,int);
22762306a36Sopenharmony_ci
22862306a36Sopenharmony_ci/* The following entry points are all lower level things you normally don't
22962306a36Sopenharmony_ci   want to worry about. */
23062306a36Sopenharmony_ci
23162306a36Sopenharmony_ci/* Issue a command and get a response from the device.  LOTS of higher
23262306a36Sopenharmony_ci   level stuff is built on this. */
23362306a36Sopenharmony_ciint pvr2_send_request(struct pvr2_hdw *,
23462306a36Sopenharmony_ci		      void *write_ptr,unsigned int write_len,
23562306a36Sopenharmony_ci		      void *read_ptr,unsigned int read_len);
23662306a36Sopenharmony_ci
23762306a36Sopenharmony_ci/* Slightly higher level device communication functions. */
23862306a36Sopenharmony_ciint pvr2_write_register(struct pvr2_hdw *, u16, u32);
23962306a36Sopenharmony_ci
24062306a36Sopenharmony_ci/* Call if for any reason we can't talk to the hardware anymore - this will
24162306a36Sopenharmony_ci   cause the driver to stop flailing on the device. */
24262306a36Sopenharmony_civoid pvr2_hdw_render_useless(struct pvr2_hdw *);
24362306a36Sopenharmony_ci
24462306a36Sopenharmony_ci/* Set / clear 8051's reset bit */
24562306a36Sopenharmony_civoid pvr2_hdw_cpureset_assert(struct pvr2_hdw *,int);
24662306a36Sopenharmony_ci
24762306a36Sopenharmony_ci/* Execute a USB-commanded device reset */
24862306a36Sopenharmony_civoid pvr2_hdw_device_reset(struct pvr2_hdw *);
24962306a36Sopenharmony_ci
25062306a36Sopenharmony_ci/* Reset worker's error trapping circuit breaker */
25162306a36Sopenharmony_ciint pvr2_hdw_untrip(struct pvr2_hdw *);
25262306a36Sopenharmony_ci
25362306a36Sopenharmony_ci/* Execute hard reset command (after this point it's likely that the
25462306a36Sopenharmony_ci   encoder will have to be reconfigured).  This also clears the "useless"
25562306a36Sopenharmony_ci   state. */
25662306a36Sopenharmony_ciint pvr2_hdw_cmd_deep_reset(struct pvr2_hdw *);
25762306a36Sopenharmony_ci
25862306a36Sopenharmony_ci/* Execute simple reset command */
25962306a36Sopenharmony_ciint pvr2_hdw_cmd_powerup(struct pvr2_hdw *);
26062306a36Sopenharmony_ci
26162306a36Sopenharmony_ci/* Order decoder to reset */
26262306a36Sopenharmony_ciint pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *);
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ci/* Direct manipulation of GPIO bits */
26562306a36Sopenharmony_ciint pvr2_hdw_gpio_get_dir(struct pvr2_hdw *hdw,u32 *);
26662306a36Sopenharmony_ciint pvr2_hdw_gpio_get_out(struct pvr2_hdw *hdw,u32 *);
26762306a36Sopenharmony_ciint pvr2_hdw_gpio_get_in(struct pvr2_hdw *hdw,u32 *);
26862306a36Sopenharmony_ciint pvr2_hdw_gpio_chg_dir(struct pvr2_hdw *hdw,u32 msk,u32 val);
26962306a36Sopenharmony_ciint pvr2_hdw_gpio_chg_out(struct pvr2_hdw *hdw,u32 msk,u32 val);
27062306a36Sopenharmony_ci
27162306a36Sopenharmony_ci/* This data structure is specifically for the next function... */
27262306a36Sopenharmony_cistruct pvr2_hdw_debug_info {
27362306a36Sopenharmony_ci	int big_lock_held;
27462306a36Sopenharmony_ci	int ctl_lock_held;
27562306a36Sopenharmony_ci	int flag_disconnected;
27662306a36Sopenharmony_ci	int flag_init_ok;
27762306a36Sopenharmony_ci	int flag_ok;
27862306a36Sopenharmony_ci	int fw1_state;
27962306a36Sopenharmony_ci	int flag_decoder_missed;
28062306a36Sopenharmony_ci	int flag_tripped;
28162306a36Sopenharmony_ci	int state_encoder_ok;
28262306a36Sopenharmony_ci	int state_encoder_run;
28362306a36Sopenharmony_ci	int state_decoder_run;
28462306a36Sopenharmony_ci	int state_decoder_ready;
28562306a36Sopenharmony_ci	int state_usbstream_run;
28662306a36Sopenharmony_ci	int state_decoder_quiescent;
28762306a36Sopenharmony_ci	int state_pipeline_config;
28862306a36Sopenharmony_ci	int state_pipeline_req;
28962306a36Sopenharmony_ci	int state_pipeline_pause;
29062306a36Sopenharmony_ci	int state_pipeline_idle;
29162306a36Sopenharmony_ci	int cmd_debug_state;
29262306a36Sopenharmony_ci	int cmd_debug_write_len;
29362306a36Sopenharmony_ci	int cmd_debug_read_len;
29462306a36Sopenharmony_ci	int cmd_debug_write_pend;
29562306a36Sopenharmony_ci	int cmd_debug_read_pend;
29662306a36Sopenharmony_ci	int cmd_debug_timeout;
29762306a36Sopenharmony_ci	int cmd_debug_rstatus;
29862306a36Sopenharmony_ci	int cmd_debug_wstatus;
29962306a36Sopenharmony_ci	unsigned char cmd_code;
30062306a36Sopenharmony_ci};
30162306a36Sopenharmony_ci
30262306a36Sopenharmony_ci/* Non-intrusively retrieve internal state info - this is useful for
30362306a36Sopenharmony_ci   diagnosing lockups.  Note that this operation is completed without any
30462306a36Sopenharmony_ci   kind of locking and so it is not atomic and may yield inconsistent
30562306a36Sopenharmony_ci   results.  This is *purely* a debugging aid. */
30662306a36Sopenharmony_civoid pvr2_hdw_get_debug_info_unlocked(const struct pvr2_hdw *hdw,
30762306a36Sopenharmony_ci				      struct pvr2_hdw_debug_info *);
30862306a36Sopenharmony_ci
30962306a36Sopenharmony_ci/* Intrusively retrieve internal state info - this is useful for
31062306a36Sopenharmony_ci   diagnosing overall driver state.  This operation synchronizes against
31162306a36Sopenharmony_ci   the overall driver mutex - so if there are locking problems this will
31262306a36Sopenharmony_ci   likely hang!  This is *purely* a debugging aid. */
31362306a36Sopenharmony_civoid pvr2_hdw_get_debug_info_locked(struct pvr2_hdw *hdw,
31462306a36Sopenharmony_ci				    struct pvr2_hdw_debug_info *);
31562306a36Sopenharmony_ci
31662306a36Sopenharmony_ci/* Report out several lines of text that describes driver internal state.
31762306a36Sopenharmony_ci   Results are written into the passed-in buffer. */
31862306a36Sopenharmony_ciunsigned int pvr2_hdw_state_report(struct pvr2_hdw *hdw,
31962306a36Sopenharmony_ci				   char *buf_ptr,unsigned int buf_size);
32062306a36Sopenharmony_ci
32162306a36Sopenharmony_ci/* Cause modules to log their state once */
32262306a36Sopenharmony_civoid pvr2_hdw_trigger_module_log(struct pvr2_hdw *hdw);
32362306a36Sopenharmony_ci
32462306a36Sopenharmony_ci/* Cause encoder firmware to be uploaded into the device.  This is normally
32562306a36Sopenharmony_ci   done autonomously, but the interface is exported here because it is also
32662306a36Sopenharmony_ci   a debugging aid. */
32762306a36Sopenharmony_ciint pvr2_upload_firmware2(struct pvr2_hdw *hdw);
32862306a36Sopenharmony_ci
32962306a36Sopenharmony_ci#endif /* __PVRUSB2_HDW_H */
330