Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * tascam.c - a part of driver for TASCAM FireWire series
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * Copyright (c) 2015 Takashi Sakamoto
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #include "tascam.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) MODULE_DESCRIPTION("TASCAM FireWire series Driver");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) MODULE_AUTHOR("Takashi Sakamoto <o-takashi@sakamocchi.jp>");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) MODULE_LICENSE("GPL v2");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) static const struct snd_tscm_spec model_specs[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 		.name = "FW-1884",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 		.has_adat = true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 		.has_spdif = true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 		.pcm_capture_analog_channels = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 		.pcm_playback_analog_channels = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 		.midi_capture_ports = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 		.midi_playback_ports = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 		.name = "FW-1082",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 		.has_adat = false,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 		.has_spdif = true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 		.pcm_capture_analog_channels = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 		.pcm_playback_analog_channels = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 		.midi_capture_ports = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 		.midi_playback_ports = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 		.name = "FW-1804",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 		.has_adat = true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 		.has_spdif = true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 		.pcm_capture_analog_channels = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 		.pcm_playback_analog_channels = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 		.midi_capture_ports = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 		.midi_playback_ports = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) static int identify_model(struct snd_tscm *tscm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	struct fw_device *fw_dev = fw_parent_device(tscm->unit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	const u32 *config_rom = fw_dev->config_rom;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	char model[9];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	unsigned int i;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	u8 c;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	if (fw_dev->config_rom_length < 30) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 		dev_err(&tscm->unit->device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 			"Configuration ROM is too short.\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 		return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	/* Pick up model name from certain addresses. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	for (i = 0; i < 8; i++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 		c = config_rom[28 + i / 4] >> (24 - 8 * (i % 4));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 		if (c == '\0')
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 			break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 		model[i] = c;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	model[i] = '\0';
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	for (i = 0; i < ARRAY_SIZE(model_specs); i++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 		if (strcmp(model, model_specs[i].name) == 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 			tscm->spec = &model_specs[i];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 			break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	if (tscm->spec == NULL)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 		return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	strcpy(tscm->card->driver, "FW-TASCAM");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	strcpy(tscm->card->shortname, model);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	strcpy(tscm->card->mixername, model);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	snprintf(tscm->card->longname, sizeof(tscm->card->longname),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 		 "TASCAM %s, GUID %08x%08x at %s, S%d", model,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 		 fw_dev->config_rom[3], fw_dev->config_rom[4],
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 		 dev_name(&tscm->unit->device), 100 << fw_dev->max_speed);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) static void tscm_card_free(struct snd_card *card)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	struct snd_tscm *tscm = card->private_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	snd_tscm_transaction_unregister(tscm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	snd_tscm_stream_destroy_duplex(tscm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) static void do_registration(struct work_struct *work)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	struct snd_tscm *tscm = container_of(work, struct snd_tscm, dwork.work);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	int err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	err = snd_card_new(&tscm->unit->device, -1, NULL, THIS_MODULE, 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 			   &tscm->card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	if (err < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 		return;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	tscm->card->private_free = tscm_card_free;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	tscm->card->private_data = tscm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	err = identify_model(tscm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	if (err < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 		goto error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	err = snd_tscm_transaction_register(tscm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	if (err < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 		goto error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	err = snd_tscm_stream_init_duplex(tscm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	if (err < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 		goto error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	snd_tscm_proc_init(tscm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	err = snd_tscm_create_pcm_devices(tscm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	if (err < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 		goto error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	err = snd_tscm_create_midi_devices(tscm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	if (err < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 		goto error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	err = snd_tscm_create_hwdep_device(tscm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	if (err < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 		goto error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	err = snd_card_register(tscm->card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	if (err < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 		goto error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	tscm->registered = true;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	return;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) error:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	snd_card_free(tscm->card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	dev_info(&tscm->unit->device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 		 "Sound card registration failed: %d\n", err);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) static int snd_tscm_probe(struct fw_unit *unit,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 			   const struct ieee1394_device_id *entry)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	struct snd_tscm *tscm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	/* Allocate this independent of sound card instance. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	tscm = devm_kzalloc(&unit->device, sizeof(struct snd_tscm), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	if (!tscm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 		return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	tscm->unit = fw_unit_get(unit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	dev_set_drvdata(&unit->device, tscm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	mutex_init(&tscm->mutex);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	spin_lock_init(&tscm->lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	init_waitqueue_head(&tscm->hwdep_wait);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	/* Allocate and register this sound card later. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	INIT_DEFERRABLE_WORK(&tscm->dwork, do_registration);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 	snd_fw_schedule_registration(unit, &tscm->dwork);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) static void snd_tscm_update(struct fw_unit *unit)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	struct snd_tscm *tscm = dev_get_drvdata(&unit->device);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	/* Postpone a workqueue for deferred registration. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	if (!tscm->registered)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 		snd_fw_schedule_registration(unit, &tscm->dwork);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	snd_tscm_transaction_reregister(tscm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	 * After registration, userspace can start packet streaming, then this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	 * code block works fine.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	if (tscm->registered) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 		mutex_lock(&tscm->mutex);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 		snd_tscm_stream_update_duplex(tscm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 		mutex_unlock(&tscm->mutex);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) static void snd_tscm_remove(struct fw_unit *unit)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	struct snd_tscm *tscm = dev_get_drvdata(&unit->device);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	 * Confirm to stop the work for registration before the sound card is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	 * going to be released. The work is not scheduled again because bus
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	 * reset handler is not called anymore.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 	cancel_delayed_work_sync(&tscm->dwork);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	if (tscm->registered) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 		// Block till all of ALSA character devices are released.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 		snd_card_free(tscm->card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	mutex_destroy(&tscm->mutex);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	fw_unit_put(tscm->unit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) static const struct ieee1394_device_id snd_tscm_id_table[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	// Tascam, FW-1884.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 		.match_flags = IEEE1394_MATCH_VENDOR_ID |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 			       IEEE1394_MATCH_SPECIFIER_ID |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 			       IEEE1394_MATCH_VERSION,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 		.vendor_id = 0x00022e,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 		.specifier_id = 0x00022e,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 		.version = 0x800000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	// Tascam, FE-8 (.version = 0x800001)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 	// This kernel module doesn't support FE-8 because the most of features
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	// can be implemented in userspace without any specific support of this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 	// module.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	//
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	// .version = 0x800002 is unknown.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	//
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	// Tascam, FW-1082.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 		.match_flags = IEEE1394_MATCH_VENDOR_ID |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 			       IEEE1394_MATCH_SPECIFIER_ID |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 			       IEEE1394_MATCH_VERSION,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 		.vendor_id = 0x00022e,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 		.specifier_id = 0x00022e,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 		.version = 0x800003,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 	// Tascam, FW-1804.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 		.match_flags = IEEE1394_MATCH_VENDOR_ID |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 			       IEEE1394_MATCH_SPECIFIER_ID |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 			       IEEE1394_MATCH_VERSION,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 		.vendor_id = 0x00022e,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 		.specifier_id = 0x00022e,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 		.version = 0x800004,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 	{}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) MODULE_DEVICE_TABLE(ieee1394, snd_tscm_id_table);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) static struct fw_driver tscm_driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 	.driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) 		.owner = THIS_MODULE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 		.name = KBUILD_MODNAME,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 		.bus = &fw_bus_type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 	.probe    = snd_tscm_probe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 	.update   = snd_tscm_update,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 	.remove   = snd_tscm_remove,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 	.id_table = snd_tscm_id_table,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) static int __init snd_tscm_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 	return driver_register(&tscm_driver.driver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) static void __exit snd_tscm_exit(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 	driver_unregister(&tscm_driver.driver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) module_init(snd_tscm_init);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) module_exit(snd_tscm_exit);