#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/parport.h>
#include <linux/spinlock.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/rawmidi.h>
#include <sound/control.h>
#define CARD_NAME …
#define DRIVER_NAME …
#define PLATFORM_DRIVER …
static int index[SNDRV_CARDS] = …;
static char *id[SNDRV_CARDS] = …;
static bool enable[SNDRV_CARDS] = …;
static struct platform_device *platform_devices[SNDRV_CARDS];
static int device_count;
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
#define MTS64_NUM_INPUT_PORTS …
#define MTS64_NUM_OUTPUT_PORTS …
#define MTS64_SMPTE_SUBSTREAM …
struct mts64 { … };
static int snd_mts64_free(struct mts64 *mts)
{ … }
static int snd_mts64_create(struct snd_card *card,
struct pardevice *pardev,
struct mts64 **rchip)
{ … }
#define MTS64_STAT_BSY …
#define MTS64_STAT_BIT_SET …
#define MTS64_STAT_PORT …
#define MTS64_CTL_READOUT …
#define MTS64_CTL_WRITE_CMD …
#define MTS64_CTL_WRITE_DATA …
#define MTS64_CTL_STROBE …
#define MTS64_CMD_RESET …
#define MTS64_CMD_PROBE …
#define MTS64_CMD_SMPTE_SET_TIME …
#define MTS64_CMD_SMPTE_SET_FPS …
#define MTS64_CMD_SMPTE_STOP …
#define MTS64_CMD_SMPTE_FPS_24 …
#define MTS64_CMD_SMPTE_FPS_25 …
#define MTS64_CMD_SMPTE_FPS_2997 …
#define MTS64_CMD_SMPTE_FPS_30D …
#define MTS64_CMD_SMPTE_FPS_30 …
#define MTS64_CMD_COM_OPEN …
#define MTS64_CMD_COM_CLOSE1 …
#define MTS64_CMD_COM_CLOSE2 …
static void mts64_enable_readout(struct parport *p);
static void mts64_disable_readout(struct parport *p);
static int mts64_device_ready(struct parport *p);
static int mts64_device_init(struct parport *p);
static int mts64_device_open(struct mts64 *mts);
static int mts64_device_close(struct mts64 *mts);
static u8 mts64_map_midi_input(u8 c);
static int mts64_probe(struct parport *p);
static u16 mts64_read(struct parport *p);
static u8 mts64_read_char(struct parport *p);
static void mts64_smpte_start(struct parport *p,
u8 hours, u8 minutes,
u8 seconds, u8 frames,
u8 idx);
static void mts64_smpte_stop(struct parport *p);
static void mts64_write_command(struct parport *p, u8 c);
static void mts64_write_data(struct parport *p, u8 c);
static void mts64_write_midi(struct mts64 *mts, u8 c, int midiport);
static void mts64_enable_readout(struct parport *p)
{ … }
static void mts64_disable_readout(struct parport *p)
{ … }
static int mts64_device_ready(struct parport *p)
{ … }
static int mts64_device_init(struct parport *p)
{ … }
static int mts64_device_open(struct mts64 *mts)
{ … }
static int mts64_device_close(struct mts64 *mts)
{ … }
static u8 mts64_map_midi_input(u8 c)
{ … }
static int mts64_probe(struct parport *p)
{ … }
static u16 mts64_read(struct parport *p)
{ … }
static u8 mts64_read_char(struct parport *p)
{ … }
static void mts64_smpte_start(struct parport *p,
u8 hours, u8 minutes,
u8 seconds, u8 frames,
u8 idx)
{ … }
static void mts64_smpte_stop(struct parport *p)
{ … }
static void mts64_write_command(struct parport *p, u8 c)
{ … }
static void mts64_write_data(struct parport *p, u8 c)
{ … }
static void mts64_write_midi(struct mts64 *mts, u8 c,
int midiport)
{ … }
#define snd_mts64_ctl_smpte_switch_info …
static int snd_mts64_ctl_smpte_switch_get(struct snd_kcontrol* kctl,
struct snd_ctl_elem_value *uctl)
{ … }
static int snd_mts64_ctl_smpte_switch_put(struct snd_kcontrol* kctl,
struct snd_ctl_elem_value *uctl)
{ … }
static const struct snd_kcontrol_new mts64_ctl_smpte_switch = …;
static int snd_mts64_ctl_smpte_time_h_info(struct snd_kcontrol *kctl,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_mts64_ctl_smpte_time_f_info(struct snd_kcontrol *kctl,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_mts64_ctl_smpte_time_info(struct snd_kcontrol *kctl,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_mts64_ctl_smpte_time_get(struct snd_kcontrol *kctl,
struct snd_ctl_elem_value *uctl)
{ … }
static int snd_mts64_ctl_smpte_time_put(struct snd_kcontrol *kctl,
struct snd_ctl_elem_value *uctl)
{ … }
static const struct snd_kcontrol_new mts64_ctl_smpte_time_hours = …;
static const struct snd_kcontrol_new mts64_ctl_smpte_time_minutes = …;
static const struct snd_kcontrol_new mts64_ctl_smpte_time_seconds = …;
static const struct snd_kcontrol_new mts64_ctl_smpte_time_frames = …;
static int snd_mts64_ctl_smpte_fps_info(struct snd_kcontrol *kctl,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_mts64_ctl_smpte_fps_get(struct snd_kcontrol *kctl,
struct snd_ctl_elem_value *uctl)
{ … }
static int snd_mts64_ctl_smpte_fps_put(struct snd_kcontrol *kctl,
struct snd_ctl_elem_value *uctl)
{ … }
static const struct snd_kcontrol_new mts64_ctl_smpte_fps = …;
static int snd_mts64_ctl_create(struct snd_card *card,
struct mts64 *mts)
{ … }
#define MTS64_MODE_INPUT_TRIGGERED …
static int snd_mts64_rawmidi_open(struct snd_rawmidi_substream *substream)
{ … }
static int snd_mts64_rawmidi_close(struct snd_rawmidi_substream *substream)
{ … }
static void snd_mts64_rawmidi_output_trigger(struct snd_rawmidi_substream *substream,
int up)
{ … }
static void snd_mts64_rawmidi_input_trigger(struct snd_rawmidi_substream *substream,
int up)
{ … }
static const struct snd_rawmidi_ops snd_mts64_rawmidi_output_ops = …;
static const struct snd_rawmidi_ops snd_mts64_rawmidi_input_ops = …;
static int snd_mts64_rawmidi_create(struct snd_card *card)
{ … }
static void snd_mts64_interrupt(void *private)
{ … }
static void snd_mts64_attach(struct parport *p)
{ … }
static void snd_mts64_detach(struct parport *p)
{ … }
static int snd_mts64_dev_probe(struct pardevice *pardev)
{ … }
static struct parport_driver mts64_parport_driver = …;
static void snd_mts64_card_private_free(struct snd_card *card)
{ … }
static int snd_mts64_probe(struct platform_device *pdev)
{ … }
static void snd_mts64_remove(struct platform_device *pdev)
{ … }
static struct platform_driver snd_mts64_driver = …;
static void snd_mts64_unregister_all(void)
{ … }
static int __init snd_mts64_module_init(void)
{ … }
static void __exit snd_mts64_module_exit(void)
{ … }
module_init(…) …;
module_exit(snd_mts64_module_exit);