linux/sound/firewire/bebob/bebob.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * bebob.c - a part of driver for BeBoB based devices
 *
 * Copyright (c) 2013-2014 Takashi Sakamoto
 */

/*
 * BeBoB is 'BridgeCo enhanced Breakout Box'. This is installed to firewire
 * devices with DM1000/DM1100/DM1500 chipset. It gives common way for host
 * system to handle BeBoB based devices.
 */

#include "bebob.h"

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();

static int index[SNDRV_CARDS]	=;
static char *id[SNDRV_CARDS]	=;
static bool enable[SNDRV_CARDS]	=;

module_param_array();
MODULE_PARM_DESC();
module_param_array();
MODULE_PARM_DESC();
module_param_array();
MODULE_PARM_DESC();

static DEFINE_MUTEX(devices_mutex);
static DECLARE_BITMAP(devices_used, SNDRV_CARDS);

/* Offsets from information register. */
#define INFO_OFFSET_BEBOB_VERSION
#define INFO_OFFSET_GUID
#define INFO_OFFSET_HW_MODEL_ID
#define INFO_OFFSET_HW_MODEL_REVISION

#define VEN_EDIROL
#define VEN_PRESONUS
#define VEN_BRIDGECO
#define VEN_MACKIE
#define VEN_STANTON
#define VEN_TASCAM
#define VEN_BEHRINGER
#define VEN_APOGEE
#define VEN_ESI
#define VEN_CME
#define VEN_PHONIC
#define VEN_LYNX
#define VEN_ICON
#define VEN_PRISMSOUND
#define VEN_TERRATEC
#define VEN_YAMAHA
#define VEN_FOCUSRITE
#define VEN_MAUDIO
#define VEN_DIGIDESIGN
#define OUI_SHOUYO

#define MODEL_FOCUSRITE_SAFFIRE_BOTH
#define MODEL_MAUDIO_AUDIOPHILE_BOTH
#define MODEL_MAUDIO_FW1814
#define MODEL_MAUDIO_PROJECTMIX
#define MODEL_MAUDIO_PROFIRELIGHTBRIDGE

static int
name_device(struct snd_bebob *bebob)
{}

static void
bebob_card_free(struct snd_card *card)
{}

static const struct snd_bebob_spec *
get_saffire_spec(struct fw_unit *unit)
{}

static bool
check_audiophile_booted(struct fw_unit *unit)
{}

static int detect_quirks(struct snd_bebob *bebob, const struct ieee1394_device_id *entry)
{}

static int bebob_probe(struct fw_unit *unit, const struct ieee1394_device_id *entry)
{}

/*
 * This driver doesn't update streams in bus reset handler.
 *
 * DM1000/ DM1100/DM1500 chipsets with BeBoB firmware transfer packets with
 * discontinued counter at bus reset. This discontinuity is immediately
 * detected in packet streaming layer, then it sets XRUN to PCM substream.
 *
 * ALSA PCM applications can know the XRUN by getting -EPIPE from PCM operation.
 * Then, they can recover the PCM substream by executing ioctl(2) with
 * SNDRV_PCM_IOCTL_PREPARE. 'struct snd_pcm_ops.prepare' is called and drivers
 * restart packet streaming.
 *
 * The above processing may be executed before this bus-reset handler is
 * executed. When this handler updates streams with current isochronous
 * channels, the streams already have the current ones.
 */
static void
bebob_update(struct fw_unit *unit)
{}

static void bebob_remove(struct fw_unit *unit)
{}

static const struct snd_bebob_rate_spec normal_rate_spec =;
static const struct snd_bebob_spec spec_normal =;

#define SPECIFIER_1394TA

// The immediate entry for version in unit directory differs depending on models:
//  * 0x010001
//  * 0x014001
#define SND_BEBOB_DEV_ENTRY(vendor, model, data)

static const struct ieee1394_device_id bebob_id_table[] =;
MODULE_DEVICE_TABLE(ieee1394, bebob_id_table);

static struct fw_driver bebob_driver =;

static int __init
snd_bebob_init(void)
{}

static void __exit
snd_bebob_exit(void)
{}

module_init();
module_exit(snd_bebob_exit);