dice               22 sound/firewire/dice/dice-alesis.c int snd_dice_detect_alesis_formats(struct snd_dice *dice)
dice               29 sound/firewire/dice/dice-alesis.c 	err = snd_dice_transaction_read_tx(dice, TX_NUMBER_AUDIO, &reg,
dice               36 sound/firewire/dice/dice-alesis.c 		memcpy(dice->tx_pcm_chs, alesis_io14_tx_pcm_chs,
dice               40 sound/firewire/dice/dice-alesis.c 		memcpy(dice->tx_pcm_chs, alesis_io26_tx_pcm_chs,
dice               46 sound/firewire/dice/dice-alesis.c 		dice->rx_pcm_chs[0][i] = 8;
dice               48 sound/firewire/dice/dice-alesis.c 	dice->tx_midi_ports[0] = 1;
dice               49 sound/firewire/dice/dice-alesis.c 	dice->rx_midi_ports[0] = 1;
dice               50 sound/firewire/dice/dice-extension.c static inline int read_transaction(struct snd_dice *dice, u64 section_addr,
dice               53 sound/firewire/dice/dice-extension.c 	return snd_fw_transaction(dice->unit,
dice               59 sound/firewire/dice/dice-extension.c static int read_stream_entries(struct snd_dice *dice, u64 section_addr,
dice               72 sound/firewire/dice/dice-extension.c 		err = read_transaction(dice, section_addr,
dice               84 sound/firewire/dice/dice-extension.c static int detect_stream_formats(struct snd_dice *dice, u64 section_addr)
dice              107 sound/firewire/dice/dice-extension.c 		if (!(cap & dice->clock_caps))
dice              112 sound/firewire/dice/dice-extension.c 		err = read_transaction(dice, section_addr,
dice              120 sound/firewire/dice/dice-extension.c 		err = read_stream_entries(dice, section_addr, base_offset,
dice              122 sound/firewire/dice/dice-extension.c 					  dice->tx_pcm_chs,
dice              123 sound/firewire/dice/dice-extension.c 					  dice->tx_midi_ports);
dice              129 sound/firewire/dice/dice-extension.c 		err = read_stream_entries(dice, section_addr, base_offset,
dice              131 sound/firewire/dice/dice-extension.c 					  mode, dice->rx_pcm_chs,
dice              132 sound/firewire/dice/dice-extension.c 					  dice->rx_midi_ports);
dice              140 sound/firewire/dice/dice-extension.c int snd_dice_detect_extension_formats(struct snd_dice *dice)
dice              151 sound/firewire/dice/dice-extension.c 	err = snd_fw_transaction(dice->unit, TCODE_READ_BLOCK_REQUEST,
dice              171 sound/firewire/dice/dice-extension.c 	err = detect_stream_formats(dice, section_addr);
dice               14 sound/firewire/dice/dice-hwdep.c 	struct snd_dice *dice = hwdep->private_data;
dice               18 sound/firewire/dice/dice-hwdep.c 	spin_lock_irq(&dice->lock);
dice               20 sound/firewire/dice/dice-hwdep.c 	while (!dice->dev_lock_changed && dice->notification_bits == 0) {
dice               21 sound/firewire/dice/dice-hwdep.c 		prepare_to_wait(&dice->hwdep_wait, &wait, TASK_INTERRUPTIBLE);
dice               22 sound/firewire/dice/dice-hwdep.c 		spin_unlock_irq(&dice->lock);
dice               24 sound/firewire/dice/dice-hwdep.c 		finish_wait(&dice->hwdep_wait, &wait);
dice               27 sound/firewire/dice/dice-hwdep.c 		spin_lock_irq(&dice->lock);
dice               31 sound/firewire/dice/dice-hwdep.c 	if (dice->dev_lock_changed) {
dice               33 sound/firewire/dice/dice-hwdep.c 		event.lock_status.status = dice->dev_lock_count > 0;
dice               34 sound/firewire/dice/dice-hwdep.c 		dice->dev_lock_changed = false;
dice               40 sound/firewire/dice/dice-hwdep.c 		event.dice_notification.notification = dice->notification_bits;
dice               41 sound/firewire/dice/dice-hwdep.c 		dice->notification_bits = 0;
dice               46 sound/firewire/dice/dice-hwdep.c 	spin_unlock_irq(&dice->lock);
dice               57 sound/firewire/dice/dice-hwdep.c 	struct snd_dice *dice = hwdep->private_data;
dice               60 sound/firewire/dice/dice-hwdep.c 	poll_wait(file, &dice->hwdep_wait, wait);
dice               62 sound/firewire/dice/dice-hwdep.c 	spin_lock_irq(&dice->lock);
dice               63 sound/firewire/dice/dice-hwdep.c 	if (dice->dev_lock_changed || dice->notification_bits != 0)
dice               67 sound/firewire/dice/dice-hwdep.c 	spin_unlock_irq(&dice->lock);
dice               72 sound/firewire/dice/dice-hwdep.c static int hwdep_get_info(struct snd_dice *dice, void __user *arg)
dice               74 sound/firewire/dice/dice-hwdep.c 	struct fw_device *dev = fw_parent_device(dice->unit);
dice               91 sound/firewire/dice/dice-hwdep.c static int hwdep_lock(struct snd_dice *dice)
dice               95 sound/firewire/dice/dice-hwdep.c 	spin_lock_irq(&dice->lock);
dice               97 sound/firewire/dice/dice-hwdep.c 	if (dice->dev_lock_count == 0) {
dice               98 sound/firewire/dice/dice-hwdep.c 		dice->dev_lock_count = -1;
dice              104 sound/firewire/dice/dice-hwdep.c 	spin_unlock_irq(&dice->lock);
dice              109 sound/firewire/dice/dice-hwdep.c static int hwdep_unlock(struct snd_dice *dice)
dice              113 sound/firewire/dice/dice-hwdep.c 	spin_lock_irq(&dice->lock);
dice              115 sound/firewire/dice/dice-hwdep.c 	if (dice->dev_lock_count == -1) {
dice              116 sound/firewire/dice/dice-hwdep.c 		dice->dev_lock_count = 0;
dice              122 sound/firewire/dice/dice-hwdep.c 	spin_unlock_irq(&dice->lock);
dice              129 sound/firewire/dice/dice-hwdep.c 	struct snd_dice *dice = hwdep->private_data;
dice              131 sound/firewire/dice/dice-hwdep.c 	spin_lock_irq(&dice->lock);
dice              132 sound/firewire/dice/dice-hwdep.c 	if (dice->dev_lock_count == -1)
dice              133 sound/firewire/dice/dice-hwdep.c 		dice->dev_lock_count = 0;
dice              134 sound/firewire/dice/dice-hwdep.c 	spin_unlock_irq(&dice->lock);
dice              142 sound/firewire/dice/dice-hwdep.c 	struct snd_dice *dice = hwdep->private_data;
dice              146 sound/firewire/dice/dice-hwdep.c 		return hwdep_get_info(dice, (void __user *)arg);
dice              148 sound/firewire/dice/dice-hwdep.c 		return hwdep_lock(dice);
dice              150 sound/firewire/dice/dice-hwdep.c 		return hwdep_unlock(dice);
dice              167 sound/firewire/dice/dice-hwdep.c int snd_dice_create_hwdep(struct snd_dice *dice)
dice              179 sound/firewire/dice/dice-hwdep.c 	err = snd_hwdep_new(dice->card, "DICE", 0, &hwdep);
dice              185 sound/firewire/dice/dice-hwdep.c 	hwdep->private_data = dice;
dice               11 sound/firewire/dice/dice-midi.c 	struct snd_dice *dice = substream->rmidi->private_data;
dice               14 sound/firewire/dice/dice-midi.c 	err = snd_dice_stream_lock_try(dice);
dice               18 sound/firewire/dice/dice-midi.c 	mutex_lock(&dice->mutex);
dice               20 sound/firewire/dice/dice-midi.c 	err = snd_dice_stream_reserve_duplex(dice, 0);
dice               22 sound/firewire/dice/dice-midi.c 		++dice->substreams_counter;
dice               23 sound/firewire/dice/dice-midi.c 		err = snd_dice_stream_start_duplex(dice);
dice               25 sound/firewire/dice/dice-midi.c 			--dice->substreams_counter;
dice               28 sound/firewire/dice/dice-midi.c 	mutex_unlock(&dice->mutex);
dice               31 sound/firewire/dice/dice-midi.c 		snd_dice_stream_lock_release(dice);
dice               38 sound/firewire/dice/dice-midi.c 	struct snd_dice *dice = substream->rmidi->private_data;
dice               40 sound/firewire/dice/dice-midi.c 	mutex_lock(&dice->mutex);
dice               42 sound/firewire/dice/dice-midi.c 	--dice->substreams_counter;
dice               43 sound/firewire/dice/dice-midi.c 	snd_dice_stream_stop_duplex(dice);
dice               45 sound/firewire/dice/dice-midi.c 	mutex_unlock(&dice->mutex);
dice               47 sound/firewire/dice/dice-midi.c 	snd_dice_stream_lock_release(dice);
dice               53 sound/firewire/dice/dice-midi.c 	struct snd_dice *dice = substrm->rmidi->private_data;
dice               56 sound/firewire/dice/dice-midi.c 	spin_lock_irqsave(&dice->lock, flags);
dice               59 sound/firewire/dice/dice-midi.c 		amdtp_am824_midi_trigger(&dice->tx_stream[0],
dice               62 sound/firewire/dice/dice-midi.c 		amdtp_am824_midi_trigger(&dice->tx_stream[0],
dice               65 sound/firewire/dice/dice-midi.c 	spin_unlock_irqrestore(&dice->lock, flags);
dice               70 sound/firewire/dice/dice-midi.c 	struct snd_dice *dice = substrm->rmidi->private_data;
dice               73 sound/firewire/dice/dice-midi.c 	spin_lock_irqsave(&dice->lock, flags);
dice               76 sound/firewire/dice/dice-midi.c 		amdtp_am824_midi_trigger(&dice->rx_stream[0],
dice               79 sound/firewire/dice/dice-midi.c 		amdtp_am824_midi_trigger(&dice->rx_stream[0],
dice               82 sound/firewire/dice/dice-midi.c 	spin_unlock_irqrestore(&dice->lock, flags);
dice               85 sound/firewire/dice/dice-midi.c static void set_midi_substream_names(struct snd_dice *dice,
dice               92 sound/firewire/dice/dice-midi.c 			 "%s MIDI %d", dice->card->shortname, subs->number + 1);
dice               96 sound/firewire/dice/dice-midi.c int snd_dice_create_midi(struct snd_dice *dice)
dice              117 sound/firewire/dice/dice-midi.c 		midi_in_ports = max(midi_in_ports, dice->tx_midi_ports[i]);
dice              118 sound/firewire/dice/dice-midi.c 		midi_out_ports = max(midi_out_ports, dice->rx_midi_ports[i]);
dice              125 sound/firewire/dice/dice-midi.c 	err = snd_rawmidi_new(dice->card, dice->card->driver, 0,
dice              132 sound/firewire/dice/dice-midi.c 		 "%s MIDI", dice->card->shortname);
dice              133 sound/firewire/dice/dice-midi.c 	rmidi->private_data = dice;
dice              143 sound/firewire/dice/dice-midi.c 		set_midi_substream_names(dice, str);
dice              154 sound/firewire/dice/dice-midi.c 		set_midi_substream_names(dice, str);
dice               28 sound/firewire/dice/dice-mytek.c int snd_dice_detect_mytek_formats(struct snd_dice *dice)
dice               35 sound/firewire/dice/dice-mytek.c 	memcpy(dice->tx_pcm_chs, dev->tx_pcm_chs,
dice               37 sound/firewire/dice/dice-mytek.c 	memcpy(dice->rx_pcm_chs, dev->rx_pcm_chs,
dice               41 sound/firewire/dice/dice-mytek.c 		dice->tx_midi_ports[i] = 0;
dice               42 sound/firewire/dice/dice-mytek.c 		dice->rx_midi_ports[i] = 0;
dice               15 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice               30 sound/firewire/dice/dice-pcm.c 		pcm_channels = dice->tx_pcm_chs[index];
dice               32 sound/firewire/dice/dice-pcm.c 		pcm_channels = dice->rx_pcm_chs[index];
dice               36 sound/firewire/dice/dice-pcm.c 		if (snd_dice_stream_get_rate_mode(dice, rate, &mode) < 0)
dice               53 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice               68 sound/firewire/dice/dice-pcm.c 		pcm_channels = dice->tx_pcm_chs[index];
dice               70 sound/firewire/dice/dice-pcm.c 		pcm_channels = dice->rx_pcm_chs[index];
dice               74 sound/firewire/dice/dice-pcm.c 		if (snd_dice_stream_get_rate_mode(dice, rate, &mode) < 0)
dice               87 sound/firewire/dice/dice-pcm.c static int limit_channels_and_rates(struct snd_dice *dice,
dice               97 sound/firewire/dice/dice-pcm.c 		pcm_channels = dice->tx_pcm_chs[index];
dice               99 sound/firewire/dice/dice-pcm.c 		pcm_channels = dice->rx_pcm_chs[index];
dice              109 sound/firewire/dice/dice-pcm.c 		if (snd_dice_stream_get_rate_mode(dice, rate, &mode) < 0)
dice              125 sound/firewire/dice/dice-pcm.c static int init_hw_info(struct snd_dice *dice,
dice              138 sound/firewire/dice/dice-pcm.c 		stream = &dice->tx_stream[index];
dice              142 sound/firewire/dice/dice-pcm.c 		stream = &dice->rx_stream[index];
dice              145 sound/firewire/dice/dice-pcm.c 	err = limit_channels_and_rates(dice, substream->runtime, dir,
dice              166 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice              171 sound/firewire/dice/dice-pcm.c 	err = snd_dice_stream_lock_try(dice);
dice              175 sound/firewire/dice/dice-pcm.c 	err = init_hw_info(dice, substream);
dice              179 sound/firewire/dice/dice-pcm.c 	err = snd_dice_transaction_get_clock_source(dice, &source);
dice              203 sound/firewire/dice/dice-pcm.c 	    amdtp_stream_pcm_running(&dice->tx_stream[0]) ||
dice              204 sound/firewire/dice/dice-pcm.c 	    amdtp_stream_pcm_running(&dice->tx_stream[1]) ||
dice              205 sound/firewire/dice/dice-pcm.c 	    amdtp_stream_pcm_running(&dice->rx_stream[0]) ||
dice              206 sound/firewire/dice/dice-pcm.c 	    amdtp_stream_pcm_running(&dice->rx_stream[1])) {
dice              209 sound/firewire/dice/dice-pcm.c 		err = snd_dice_transaction_get_rate(dice, &rate);
dice              220 sound/firewire/dice/dice-pcm.c 	snd_dice_stream_lock_release(dice);
dice              226 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice              228 sound/firewire/dice/dice-pcm.c 	snd_dice_stream_lock_release(dice);
dice              236 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice              247 sound/firewire/dice/dice-pcm.c 		mutex_lock(&dice->mutex);
dice              248 sound/firewire/dice/dice-pcm.c 		err = snd_dice_stream_reserve_duplex(dice, rate);
dice              250 sound/firewire/dice/dice-pcm.c 			++dice->substreams_counter;
dice              251 sound/firewire/dice/dice-pcm.c 		mutex_unlock(&dice->mutex);
dice              259 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice              261 sound/firewire/dice/dice-pcm.c 	mutex_lock(&dice->mutex);
dice              264 sound/firewire/dice/dice-pcm.c 		--dice->substreams_counter;
dice              266 sound/firewire/dice/dice-pcm.c 	snd_dice_stream_stop_duplex(dice);
dice              268 sound/firewire/dice/dice-pcm.c 	mutex_unlock(&dice->mutex);
dice              275 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice              276 sound/firewire/dice/dice-pcm.c 	struct amdtp_stream *stream = &dice->tx_stream[substream->pcm->device];
dice              279 sound/firewire/dice/dice-pcm.c 	mutex_lock(&dice->mutex);
dice              280 sound/firewire/dice/dice-pcm.c 	err = snd_dice_stream_start_duplex(dice);
dice              281 sound/firewire/dice/dice-pcm.c 	mutex_unlock(&dice->mutex);
dice              289 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice              290 sound/firewire/dice/dice-pcm.c 	struct amdtp_stream *stream = &dice->rx_stream[substream->pcm->device];
dice              293 sound/firewire/dice/dice-pcm.c 	mutex_lock(&dice->mutex);
dice              294 sound/firewire/dice/dice-pcm.c 	err = snd_dice_stream_start_duplex(dice);
dice              295 sound/firewire/dice/dice-pcm.c 	mutex_unlock(&dice->mutex);
dice              304 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice              305 sound/firewire/dice/dice-pcm.c 	struct amdtp_stream *stream = &dice->tx_stream[substream->pcm->device];
dice              322 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice              323 sound/firewire/dice/dice-pcm.c 	struct amdtp_stream *stream = &dice->rx_stream[substream->pcm->device];
dice              341 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice              342 sound/firewire/dice/dice-pcm.c 	struct amdtp_stream *stream = &dice->tx_stream[substream->pcm->device];
dice              348 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice              349 sound/firewire/dice/dice-pcm.c 	struct amdtp_stream *stream = &dice->rx_stream[substream->pcm->device];
dice              356 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice              357 sound/firewire/dice/dice-pcm.c 	struct amdtp_stream *stream = &dice->tx_stream[substream->pcm->device];
dice              364 sound/firewire/dice/dice-pcm.c 	struct snd_dice *dice = substream->private_data;
dice              365 sound/firewire/dice/dice-pcm.c 	struct amdtp_stream *stream = &dice->rx_stream[substream->pcm->device];
dice              370 sound/firewire/dice/dice-pcm.c int snd_dice_create_pcm(struct snd_dice *dice)
dice              404 sound/firewire/dice/dice-pcm.c 			if (dice->tx_pcm_chs[i][j] > 0)
dice              406 sound/firewire/dice/dice-pcm.c 			if (dice->rx_pcm_chs[i][j] > 0)
dice              410 sound/firewire/dice/dice-pcm.c 		err = snd_pcm_new(dice->card, "DICE", i, playback, capture,
dice              414 sound/firewire/dice/dice-pcm.c 		pcm->private_data = dice;
dice              415 sound/firewire/dice/dice-pcm.c 		strcpy(pcm->name, dice->card->shortname);
dice               22 sound/firewire/dice/dice-presonus.c int snd_dice_detect_presonus_formats(struct snd_dice *dice)
dice               35 sound/firewire/dice/dice-presonus.c 	fw_csr_iterator_init(&it, dice->unit->directory);
dice               51 sound/firewire/dice/dice-presonus.c 	memcpy(dice->tx_pcm_chs, entry->spec->tx_pcm_chs,
dice               53 sound/firewire/dice/dice-presonus.c 	memcpy(dice->rx_pcm_chs, entry->spec->rx_pcm_chs,
dice               57 sound/firewire/dice/dice-presonus.c 		dice->tx_midi_ports[0] = 1;
dice               58 sound/firewire/dice/dice-presonus.c 		dice->rx_midi_ports[0] = 1;
dice               11 sound/firewire/dice/dice-proc.c static int dice_proc_read_mem(struct snd_dice *dice, void *buffer,
dice               17 sound/firewire/dice/dice-proc.c 	err = snd_fw_transaction(dice->unit, TCODE_READ_BLOCK_REQUEST,
dice               70 sound/firewire/dice/dice-proc.c 	struct snd_dice *dice = entry->private_data;
dice              117 sound/firewire/dice/dice-proc.c 	if (dice_proc_read_mem(dice, sections, 0, ARRAY_SIZE(sections)) < 0)
dice              126 sound/firewire/dice/dice-proc.c 	if (dice_proc_read_mem(dice, &buf.global, sections[0], quadlets) < 0)
dice              170 sound/firewire/dice/dice-proc.c 	if (dice_proc_read_mem(dice, &tx_rx_header, sections[2], 2) < 0)
dice              174 sound/firewire/dice/dice-proc.c 		if (dice_proc_read_mem(dice, &buf.tx, sections[2] + 2 +
dice              196 sound/firewire/dice/dice-proc.c 	if (dice_proc_read_mem(dice, &tx_rx_header, sections[4], 2) < 0)
dice              200 sound/firewire/dice/dice-proc.c 		if (dice_proc_read_mem(dice, &buf.rx, sections[4] + 2 +
dice              224 sound/firewire/dice/dice-proc.c 		if (dice_proc_read_mem(dice, &buf.ext_sync,
dice              253 sound/firewire/dice/dice-proc.c 	struct snd_dice *dice = entry->private_data;
dice              263 sound/firewire/dice/dice-proc.c 			snd_iprintf(buffer, "\t%u", dice->tx_pcm_chs[i][j]);
dice              264 sound/firewire/dice/dice-proc.c 		snd_iprintf(buffer, "\t%u\n", dice->tx_midi_ports[i]);
dice              274 sound/firewire/dice/dice-proc.c 			snd_iprintf(buffer, "\t%u", dice->rx_pcm_chs[i][j]);
dice              275 sound/firewire/dice/dice-proc.c 		snd_iprintf(buffer, "\t%u\n", dice->rx_midi_ports[i]);
dice              279 sound/firewire/dice/dice-proc.c static void add_node(struct snd_dice *dice, struct snd_info_entry *root,
dice              286 sound/firewire/dice/dice-proc.c 	entry = snd_info_create_card_entry(dice->card, name, root);
dice              288 sound/firewire/dice/dice-proc.c 		snd_info_set_text_ops(entry, dice, op);
dice              291 sound/firewire/dice/dice-proc.c void snd_dice_create_proc(struct snd_dice *dice)
dice              299 sound/firewire/dice/dice-proc.c 	root = snd_info_create_card_entry(dice->card, "firewire",
dice              300 sound/firewire/dice/dice-proc.c 					  dice->card->proc_root);
dice              305 sound/firewire/dice/dice-proc.c 	add_node(dice, root, "dice", dice_proc_read);
dice              306 sound/firewire/dice/dice-proc.c 	add_node(dice, root, "formation", dice_proc_read_formation);
dice               32 sound/firewire/dice/dice-stream.c int snd_dice_stream_get_rate_mode(struct snd_dice *dice, unsigned int rate,
dice               48 sound/firewire/dice/dice-stream.c 		if (!(dice->clock_caps & BIT(i)))
dice               64 sound/firewire/dice/dice-stream.c static int ensure_phase_lock(struct snd_dice *dice, unsigned int rate)
dice               71 sound/firewire/dice/dice-stream.c 	err = snd_dice_transaction_read_global(dice, GLOBAL_CLOCK_SELECT,
dice               87 sound/firewire/dice/dice-stream.c 	if (completion_done(&dice->clock_accepted))
dice               88 sound/firewire/dice/dice-stream.c 		reinit_completion(&dice->clock_accepted);
dice               91 sound/firewire/dice/dice-stream.c 	err = snd_dice_transaction_write_global(dice, GLOBAL_CLOCK_SELECT,
dice               96 sound/firewire/dice/dice-stream.c 	if (wait_for_completion_timeout(&dice->clock_accepted,
dice              103 sound/firewire/dice/dice-stream.c 		err = snd_dice_transaction_read_global(dice, GLOBAL_STATUS,
dice              114 sound/firewire/dice/dice-stream.c static int get_register_params(struct snd_dice *dice,
dice              121 sound/firewire/dice/dice-stream.c 	err = snd_dice_transaction_read_tx(dice, TX_NUMBER, reg, sizeof(reg));
dice              128 sound/firewire/dice/dice-stream.c 	err = snd_dice_transaction_read_rx(dice, RX_NUMBER, reg, sizeof(reg));
dice              138 sound/firewire/dice/dice-stream.c static void release_resources(struct snd_dice *dice)
dice              143 sound/firewire/dice/dice-stream.c 		fw_iso_resources_free(&dice->tx_resources[i]);
dice              144 sound/firewire/dice/dice-stream.c 		fw_iso_resources_free(&dice->rx_resources[i]);
dice              148 sound/firewire/dice/dice-stream.c static void stop_streams(struct snd_dice *dice, enum amdtp_stream_direction dir,
dice              157 sound/firewire/dice/dice-stream.c 			snd_dice_transaction_write_tx(dice,
dice              161 sound/firewire/dice/dice-stream.c 			snd_dice_transaction_write_rx(dice,
dice              168 sound/firewire/dice/dice-stream.c static int keep_resources(struct snd_dice *dice, struct amdtp_stream *stream,
dice              207 sound/firewire/dice/dice-stream.c 				fw_parent_device(dice->unit)->max_speed);
dice              210 sound/firewire/dice/dice-stream.c static int keep_dual_resources(struct snd_dice *dice, unsigned int rate,
dice              218 sound/firewire/dice/dice-stream.c 	err = snd_dice_stream_get_rate_mode(dice, rate, &mode);
dice              232 sound/firewire/dice/dice-stream.c 			stream = &dice->tx_stream[i];
dice              233 sound/firewire/dice/dice-stream.c 			resources = &dice->tx_resources[i];
dice              235 sound/firewire/dice/dice-stream.c 			pcm_cache = dice->tx_pcm_chs[i][mode];
dice              236 sound/firewire/dice/dice-stream.c 			midi_cache = dice->tx_midi_ports[i];
dice              237 sound/firewire/dice/dice-stream.c 			err = snd_dice_transaction_read_tx(dice,
dice              241 sound/firewire/dice/dice-stream.c 			stream = &dice->rx_stream[i];
dice              242 sound/firewire/dice/dice-stream.c 			resources = &dice->rx_resources[i];
dice              244 sound/firewire/dice/dice-stream.c 			pcm_cache = dice->rx_pcm_chs[i][mode];
dice              245 sound/firewire/dice/dice-stream.c 			midi_cache = dice->rx_midi_ports[i];
dice              246 sound/firewire/dice/dice-stream.c 			err = snd_dice_transaction_read_rx(dice,
dice              257 sound/firewire/dice/dice-stream.c 			dev_info(&dice->unit->device,
dice              263 sound/firewire/dice/dice-stream.c 		err = keep_resources(dice, stream, resources, rate, pcm_chs,
dice              272 sound/firewire/dice/dice-stream.c static void finish_session(struct snd_dice *dice, struct reg_params *tx_params,
dice              275 sound/firewire/dice/dice-stream.c 	stop_streams(dice, AMDTP_IN_STREAM, tx_params);
dice              276 sound/firewire/dice/dice-stream.c 	stop_streams(dice, AMDTP_OUT_STREAM, rx_params);
dice              278 sound/firewire/dice/dice-stream.c 	snd_dice_transaction_clear_enable(dice);
dice              281 sound/firewire/dice/dice-stream.c int snd_dice_stream_reserve_duplex(struct snd_dice *dice, unsigned int rate)
dice              287 sound/firewire/dice/dice-stream.c 	err = snd_dice_transaction_get_rate(dice, &curr_rate);
dice              293 sound/firewire/dice/dice-stream.c 	if (dice->substreams_counter == 0 || curr_rate != rate) {
dice              296 sound/firewire/dice/dice-stream.c 		amdtp_domain_stop(&dice->domain);
dice              298 sound/firewire/dice/dice-stream.c 		err = get_register_params(dice, &tx_params, &rx_params);
dice              301 sound/firewire/dice/dice-stream.c 		finish_session(dice, &tx_params, &rx_params);
dice              303 sound/firewire/dice/dice-stream.c 		release_resources(dice);
dice              308 sound/firewire/dice/dice-stream.c 		err = ensure_phase_lock(dice, rate);
dice              314 sound/firewire/dice/dice-stream.c 		err = get_register_params(dice, &tx_params, &rx_params);
dice              318 sound/firewire/dice/dice-stream.c 		err = keep_dual_resources(dice, rate, AMDTP_IN_STREAM,
dice              323 sound/firewire/dice/dice-stream.c 		err = keep_dual_resources(dice, rate, AMDTP_OUT_STREAM,
dice              331 sound/firewire/dice/dice-stream.c 	release_resources(dice);
dice              335 sound/firewire/dice/dice-stream.c static int start_streams(struct snd_dice *dice, enum amdtp_stream_direction dir,
dice              338 sound/firewire/dice/dice-stream.c 	unsigned int max_speed = fw_parent_device(dice->unit)->max_speed;
dice              348 sound/firewire/dice/dice-stream.c 			stream = dice->tx_stream + i;
dice              349 sound/firewire/dice/dice-stream.c 			resources = dice->tx_resources + i;
dice              351 sound/firewire/dice/dice-stream.c 			stream = dice->rx_stream + i;
dice              352 sound/firewire/dice/dice-stream.c 			resources = dice->rx_resources + i;
dice              357 sound/firewire/dice/dice-stream.c 			err = snd_dice_transaction_write_tx(dice,
dice              361 sound/firewire/dice/dice-stream.c 			err = snd_dice_transaction_write_rx(dice,
dice              370 sound/firewire/dice/dice-stream.c 			err = snd_dice_transaction_write_tx(dice,
dice              377 sound/firewire/dice/dice-stream.c 		err = amdtp_domain_add_stream(&dice->domain, stream,
dice              391 sound/firewire/dice/dice-stream.c int snd_dice_stream_start_duplex(struct snd_dice *dice)
dice              393 sound/firewire/dice/dice-stream.c 	unsigned int generation = dice->rx_resources[0].generation;
dice              400 sound/firewire/dice/dice-stream.c 	if (dice->substreams_counter == 0)
dice              403 sound/firewire/dice/dice-stream.c 	err = get_register_params(dice, &tx_params, &rx_params);
dice              409 sound/firewire/dice/dice-stream.c 		if (amdtp_streaming_error(&dice->tx_stream[i]) ||
dice              410 sound/firewire/dice/dice-stream.c 		    amdtp_streaming_error(&dice->rx_stream[i])) {
dice              411 sound/firewire/dice/dice-stream.c 			amdtp_domain_stop(&dice->domain);
dice              412 sound/firewire/dice/dice-stream.c 			finish_session(dice, &tx_params, &rx_params);
dice              417 sound/firewire/dice/dice-stream.c 	if (generation != fw_parent_device(dice->unit)->card->generation) {
dice              420 sound/firewire/dice/dice-stream.c 				fw_iso_resources_update(dice->tx_resources + i);
dice              422 sound/firewire/dice/dice-stream.c 				fw_iso_resources_update(dice->rx_resources + i);
dice              427 sound/firewire/dice/dice-stream.c 	err = snd_dice_transaction_get_rate(dice, &rate);
dice              430 sound/firewire/dice/dice-stream.c 	err = snd_dice_stream_get_rate_mode(dice, rate, &mode);
dice              434 sound/firewire/dice/dice-stream.c 		if (dice->tx_pcm_chs[i][mode] > 0 &&
dice              435 sound/firewire/dice/dice-stream.c 		    !amdtp_stream_running(&dice->tx_stream[i]))
dice              437 sound/firewire/dice/dice-stream.c 		if (dice->rx_pcm_chs[i][mode] > 0 &&
dice              438 sound/firewire/dice/dice-stream.c 		    !amdtp_stream_running(&dice->rx_stream[i]))
dice              443 sound/firewire/dice/dice-stream.c 		err = start_streams(dice, AMDTP_IN_STREAM, rate, &tx_params);
dice              447 sound/firewire/dice/dice-stream.c 		err = start_streams(dice, AMDTP_OUT_STREAM, rate, &rx_params);
dice              451 sound/firewire/dice/dice-stream.c 		err = snd_dice_transaction_set_enable(dice);
dice              453 sound/firewire/dice/dice-stream.c 			dev_err(&dice->unit->device,
dice              458 sound/firewire/dice/dice-stream.c 		err = amdtp_domain_start(&dice->domain);
dice              464 sound/firewire/dice/dice-stream.c 			    !amdtp_stream_wait_callback(&dice->tx_stream[i],
dice              467 sound/firewire/dice/dice-stream.c 			     !amdtp_stream_wait_callback(&dice->rx_stream[i],
dice              477 sound/firewire/dice/dice-stream.c 	amdtp_domain_stop(&dice->domain);
dice              478 sound/firewire/dice/dice-stream.c 	finish_session(dice, &tx_params, &rx_params);
dice              487 sound/firewire/dice/dice-stream.c void snd_dice_stream_stop_duplex(struct snd_dice *dice)
dice              491 sound/firewire/dice/dice-stream.c 	if (dice->substreams_counter == 0) {
dice              492 sound/firewire/dice/dice-stream.c 		if (get_register_params(dice, &tx_params, &rx_params) >= 0) {
dice              493 sound/firewire/dice/dice-stream.c 			amdtp_domain_stop(&dice->domain);
dice              494 sound/firewire/dice/dice-stream.c 			finish_session(dice, &tx_params, &rx_params);
dice              497 sound/firewire/dice/dice-stream.c 		release_resources(dice);
dice              501 sound/firewire/dice/dice-stream.c static int init_stream(struct snd_dice *dice, enum amdtp_stream_direction dir,
dice              509 sound/firewire/dice/dice-stream.c 		stream = &dice->tx_stream[index];
dice              510 sound/firewire/dice/dice-stream.c 		resources = &dice->tx_resources[index];
dice              512 sound/firewire/dice/dice-stream.c 		stream = &dice->rx_stream[index];
dice              513 sound/firewire/dice/dice-stream.c 		resources = &dice->rx_resources[index];
dice              516 sound/firewire/dice/dice-stream.c 	err = fw_iso_resources_init(resources, dice->unit);
dice              521 sound/firewire/dice/dice-stream.c 	err = amdtp_am824_init(stream, dice->unit, dir, CIP_BLOCKING);
dice              534 sound/firewire/dice/dice-stream.c static void destroy_stream(struct snd_dice *dice,
dice              542 sound/firewire/dice/dice-stream.c 		stream = &dice->tx_stream[index];
dice              543 sound/firewire/dice/dice-stream.c 		resources = &dice->tx_resources[index];
dice              545 sound/firewire/dice/dice-stream.c 		stream = &dice->rx_stream[index];
dice              546 sound/firewire/dice/dice-stream.c 		resources = &dice->rx_resources[index];
dice              553 sound/firewire/dice/dice-stream.c int snd_dice_stream_init_duplex(struct snd_dice *dice)
dice              558 sound/firewire/dice/dice-stream.c 		err = init_stream(dice, AMDTP_IN_STREAM, i);
dice              561 sound/firewire/dice/dice-stream.c 				destroy_stream(dice, AMDTP_IN_STREAM, i);
dice              567 sound/firewire/dice/dice-stream.c 		err = init_stream(dice, AMDTP_OUT_STREAM, i);
dice              570 sound/firewire/dice/dice-stream.c 				destroy_stream(dice, AMDTP_OUT_STREAM, i);
dice              572 sound/firewire/dice/dice-stream.c 				destroy_stream(dice, AMDTP_IN_STREAM, i);
dice              577 sound/firewire/dice/dice-stream.c 	err = amdtp_domain_init(&dice->domain);
dice              580 sound/firewire/dice/dice-stream.c 			destroy_stream(dice, AMDTP_OUT_STREAM, i);
dice              581 sound/firewire/dice/dice-stream.c 			destroy_stream(dice, AMDTP_IN_STREAM, i);
dice              588 sound/firewire/dice/dice-stream.c void snd_dice_stream_destroy_duplex(struct snd_dice *dice)
dice              593 sound/firewire/dice/dice-stream.c 		destroy_stream(dice, AMDTP_IN_STREAM, i);
dice              594 sound/firewire/dice/dice-stream.c 		destroy_stream(dice, AMDTP_OUT_STREAM, i);
dice              597 sound/firewire/dice/dice-stream.c 	amdtp_domain_destroy(&dice->domain);
dice              600 sound/firewire/dice/dice-stream.c void snd_dice_stream_update_duplex(struct snd_dice *dice)
dice              612 sound/firewire/dice/dice-stream.c 	dice->global_enabled = false;
dice              614 sound/firewire/dice/dice-stream.c 	if (get_register_params(dice, &tx_params, &rx_params) == 0) {
dice              615 sound/firewire/dice/dice-stream.c 		amdtp_domain_stop(&dice->domain);
dice              617 sound/firewire/dice/dice-stream.c 		stop_streams(dice, AMDTP_IN_STREAM, &tx_params);
dice              618 sound/firewire/dice/dice-stream.c 		stop_streams(dice, AMDTP_OUT_STREAM, &rx_params);
dice              622 sound/firewire/dice/dice-stream.c int snd_dice_stream_detect_current_formats(struct snd_dice *dice)
dice              632 sound/firewire/dice/dice-stream.c 	err = snd_dice_detect_extension_formats(dice);
dice              640 sound/firewire/dice/dice-stream.c 	err = snd_dice_transaction_get_rate(dice, &rate);
dice              644 sound/firewire/dice/dice-stream.c 	err = snd_dice_stream_get_rate_mode(dice, rate, &mode);
dice              653 sound/firewire/dice/dice-stream.c 	err = ensure_phase_lock(dice, rate);
dice              657 sound/firewire/dice/dice-stream.c 	err = get_register_params(dice, &tx_params, &rx_params);
dice              662 sound/firewire/dice/dice-stream.c 		err = snd_dice_transaction_read_tx(dice,
dice              667 sound/firewire/dice/dice-stream.c 		dice->tx_pcm_chs[i][mode] = be32_to_cpu(reg[0]);
dice              668 sound/firewire/dice/dice-stream.c 		dice->tx_midi_ports[i] = max_t(unsigned int,
dice              669 sound/firewire/dice/dice-stream.c 				be32_to_cpu(reg[1]), dice->tx_midi_ports[i]);
dice              672 sound/firewire/dice/dice-stream.c 		err = snd_dice_transaction_read_rx(dice,
dice              677 sound/firewire/dice/dice-stream.c 		dice->rx_pcm_chs[i][mode] = be32_to_cpu(reg[0]);
dice              678 sound/firewire/dice/dice-stream.c 		dice->rx_midi_ports[i] = max_t(unsigned int,
dice              679 sound/firewire/dice/dice-stream.c 				be32_to_cpu(reg[1]), dice->rx_midi_ports[i]);
dice              685 sound/firewire/dice/dice-stream.c static void dice_lock_changed(struct snd_dice *dice)
dice              687 sound/firewire/dice/dice-stream.c 	dice->dev_lock_changed = true;
dice              688 sound/firewire/dice/dice-stream.c 	wake_up(&dice->hwdep_wait);
dice              691 sound/firewire/dice/dice-stream.c int snd_dice_stream_lock_try(struct snd_dice *dice)
dice              695 sound/firewire/dice/dice-stream.c 	spin_lock_irq(&dice->lock);
dice              697 sound/firewire/dice/dice-stream.c 	if (dice->dev_lock_count < 0) {
dice              702 sound/firewire/dice/dice-stream.c 	if (dice->dev_lock_count++ == 0)
dice              703 sound/firewire/dice/dice-stream.c 		dice_lock_changed(dice);
dice              706 sound/firewire/dice/dice-stream.c 	spin_unlock_irq(&dice->lock);
dice              710 sound/firewire/dice/dice-stream.c void snd_dice_stream_lock_release(struct snd_dice *dice)
dice              712 sound/firewire/dice/dice-stream.c 	spin_lock_irq(&dice->lock);
dice              714 sound/firewire/dice/dice-stream.c 	if (WARN_ON(dice->dev_lock_count <= 0))
dice              717 sound/firewire/dice/dice-stream.c 	if (--dice->dev_lock_count == 0)
dice              718 sound/firewire/dice/dice-stream.c 		dice_lock_changed(dice);
dice              720 sound/firewire/dice/dice-stream.c 	spin_unlock_irq(&dice->lock);
dice               58 sound/firewire/dice/dice-tcelectronic.c int snd_dice_detect_tcelectronic_formats(struct snd_dice *dice)
dice               77 sound/firewire/dice/dice-tcelectronic.c 	fw_csr_iterator_init(&it, dice->unit->directory);
dice               93 sound/firewire/dice/dice-tcelectronic.c 	memcpy(dice->tx_pcm_chs, entry->spec->tx_pcm_chs,
dice               95 sound/firewire/dice/dice-tcelectronic.c 	memcpy(dice->rx_pcm_chs, entry->spec->rx_pcm_chs,
dice               99 sound/firewire/dice/dice-tcelectronic.c 		dice->tx_midi_ports[0] = 1;
dice              100 sound/firewire/dice/dice-tcelectronic.c 		dice->rx_midi_ports[0] = 1;
dice               11 sound/firewire/dice/dice-transaction.c static u64 get_subaddr(struct snd_dice *dice, enum snd_dice_addr_type type,
dice               16 sound/firewire/dice/dice-transaction.c 		offset += dice->tx_offset;
dice               19 sound/firewire/dice/dice-transaction.c 		offset += dice->rx_offset;
dice               22 sound/firewire/dice/dice-transaction.c 		offset += dice->sync_offset;
dice               25 sound/firewire/dice/dice-transaction.c 		offset += dice->rsrv_offset;
dice               29 sound/firewire/dice/dice-transaction.c 		offset += dice->global_offset;
dice               36 sound/firewire/dice/dice-transaction.c int snd_dice_transaction_write(struct snd_dice *dice,
dice               40 sound/firewire/dice/dice-transaction.c 	return snd_fw_transaction(dice->unit,
dice               43 sound/firewire/dice/dice-transaction.c 				  get_subaddr(dice, type, offset), buf, len, 0);
dice               46 sound/firewire/dice/dice-transaction.c int snd_dice_transaction_read(struct snd_dice *dice,
dice               50 sound/firewire/dice/dice-transaction.c 	return snd_fw_transaction(dice->unit,
dice               53 sound/firewire/dice/dice-transaction.c 				  get_subaddr(dice, type, offset), buf, len, 0);
dice               56 sound/firewire/dice/dice-transaction.c static unsigned int get_clock_info(struct snd_dice *dice, __be32 *info)
dice               58 sound/firewire/dice/dice-transaction.c 	return snd_dice_transaction_read_global(dice, GLOBAL_CLOCK_SELECT,
dice               62 sound/firewire/dice/dice-transaction.c int snd_dice_transaction_get_clock_source(struct snd_dice *dice,
dice               68 sound/firewire/dice/dice-transaction.c 	err = get_clock_info(dice, &info);
dice               75 sound/firewire/dice/dice-transaction.c int snd_dice_transaction_get_rate(struct snd_dice *dice, unsigned int *rate)
dice               81 sound/firewire/dice/dice-transaction.c 	err = get_clock_info(dice, &info);
dice               96 sound/firewire/dice/dice-transaction.c int snd_dice_transaction_set_enable(struct snd_dice *dice)
dice              101 sound/firewire/dice/dice-transaction.c 	if (dice->global_enabled)
dice              105 sound/firewire/dice/dice-transaction.c 	err = snd_fw_transaction(dice->unit, TCODE_WRITE_QUADLET_REQUEST,
dice              106 sound/firewire/dice/dice-transaction.c 				 get_subaddr(dice, SND_DICE_ADDR_TYPE_GLOBAL,
dice              109 sound/firewire/dice/dice-transaction.c 				 FW_FIXED_GENERATION | dice->owner_generation);
dice              113 sound/firewire/dice/dice-transaction.c 	dice->global_enabled = true;
dice              118 sound/firewire/dice/dice-transaction.c void snd_dice_transaction_clear_enable(struct snd_dice *dice)
dice              123 sound/firewire/dice/dice-transaction.c 	snd_fw_transaction(dice->unit, TCODE_WRITE_QUADLET_REQUEST,
dice              124 sound/firewire/dice/dice-transaction.c 			   get_subaddr(dice, SND_DICE_ADDR_TYPE_GLOBAL,
dice              127 sound/firewire/dice/dice-transaction.c 			   FW_FIXED_GENERATION | dice->owner_generation);
dice              129 sound/firewire/dice/dice-transaction.c 	dice->global_enabled = false;
dice              137 sound/firewire/dice/dice-transaction.c 	struct snd_dice *dice = callback_data;
dice              152 sound/firewire/dice/dice-transaction.c 	spin_lock_irqsave(&dice->lock, flags);
dice              153 sound/firewire/dice/dice-transaction.c 	dice->notification_bits |= bits;
dice              154 sound/firewire/dice/dice-transaction.c 	spin_unlock_irqrestore(&dice->lock, flags);
dice              159 sound/firewire/dice/dice-transaction.c 		complete(&dice->clock_accepted);
dice              160 sound/firewire/dice/dice-transaction.c 	wake_up(&dice->hwdep_wait);
dice              163 sound/firewire/dice/dice-transaction.c static int register_notification_address(struct snd_dice *dice, bool retry)
dice              165 sound/firewire/dice/dice-transaction.c 	struct fw_device *device = fw_parent_device(dice->unit);
dice              180 sound/firewire/dice/dice-transaction.c 			dice->notification_handler.offset);
dice              182 sound/firewire/dice/dice-transaction.c 		dice->owner_generation = device->generation;
dice              184 sound/firewire/dice/dice-transaction.c 		err = snd_fw_transaction(dice->unit, TCODE_LOCK_COMPARE_SWAP,
dice              185 sound/firewire/dice/dice-transaction.c 					 get_subaddr(dice,
dice              190 sound/firewire/dice/dice-transaction.c 							dice->owner_generation);
dice              199 sound/firewire/dice/dice-transaction.c 			dev_err(&dice->unit->device,
dice              212 sound/firewire/dice/dice-transaction.c 		dice->owner_generation = -1;
dice              217 sound/firewire/dice/dice-transaction.c static void unregister_notification_address(struct snd_dice *dice)
dice              219 sound/firewire/dice/dice-transaction.c 	struct fw_device *device = fw_parent_device(dice->unit);
dice              228 sound/firewire/dice/dice-transaction.c 		dice->notification_handler.offset);
dice              230 sound/firewire/dice/dice-transaction.c 	snd_fw_transaction(dice->unit, TCODE_LOCK_COMPARE_SWAP,
dice              231 sound/firewire/dice/dice-transaction.c 			   get_subaddr(dice, SND_DICE_ADDR_TYPE_GLOBAL,
dice              234 sound/firewire/dice/dice-transaction.c 			   FW_FIXED_GENERATION | dice->owner_generation);
dice              238 sound/firewire/dice/dice-transaction.c 	dice->owner_generation = -1;
dice              241 sound/firewire/dice/dice-transaction.c void snd_dice_transaction_destroy(struct snd_dice *dice)
dice              243 sound/firewire/dice/dice-transaction.c 	struct fw_address_handler *handler = &dice->notification_handler;
dice              248 sound/firewire/dice/dice-transaction.c 	unregister_notification_address(dice);
dice              254 sound/firewire/dice/dice-transaction.c int snd_dice_transaction_reinit(struct snd_dice *dice)
dice              256 sound/firewire/dice/dice-transaction.c 	struct fw_address_handler *handler = &dice->notification_handler;
dice              261 sound/firewire/dice/dice-transaction.c 	return register_notification_address(dice, false);
dice              264 sound/firewire/dice/dice-transaction.c static int get_subaddrs(struct snd_dice *dice)
dice              289 sound/firewire/dice/dice-transaction.c 	err = snd_fw_transaction(dice->unit, TCODE_READ_BLOCK_REQUEST,
dice              308 sound/firewire/dice/dice-transaction.c 		err = snd_fw_transaction(dice->unit, TCODE_READ_QUADLET_REQUEST,
dice              317 sound/firewire/dice/dice-transaction.c 			dev_err(&dice->unit->device,
dice              325 sound/firewire/dice/dice-transaction.c 		dice->clock_caps = 1;
dice              328 sound/firewire/dice/dice-transaction.c 	dice->global_offset = be32_to_cpu(pointers[0]) * 4;
dice              329 sound/firewire/dice/dice-transaction.c 	dice->tx_offset = be32_to_cpu(pointers[2]) * 4;
dice              330 sound/firewire/dice/dice-transaction.c 	dice->rx_offset = be32_to_cpu(pointers[4]) * 4;
dice              334 sound/firewire/dice/dice-transaction.c 		dice->sync_offset = be32_to_cpu(pointers[6]) * 4;
dice              336 sound/firewire/dice/dice-transaction.c 		dice->rsrv_offset = be32_to_cpu(pointers[8]) * 4;
dice              342 sound/firewire/dice/dice-transaction.c int snd_dice_transaction_init(struct snd_dice *dice)
dice              344 sound/firewire/dice/dice-transaction.c 	struct fw_address_handler *handler = &dice->notification_handler;
dice              347 sound/firewire/dice/dice-transaction.c 	err = get_subaddrs(dice);
dice              354 sound/firewire/dice/dice-transaction.c 	handler->callback_data = dice;
dice              362 sound/firewire/dice/dice-transaction.c 	err = register_notification_address(dice, true);
dice               68 sound/firewire/dice/dice.c static int check_clock_caps(struct snd_dice *dice)
dice               74 sound/firewire/dice/dice.c 	if (dice->clock_caps > 0) {
dice               75 sound/firewire/dice/dice.c 		err = snd_dice_transaction_read_global(dice,
dice               80 sound/firewire/dice/dice.c 		dice->clock_caps = be32_to_cpu(value);
dice               83 sound/firewire/dice/dice.c 		dice->clock_caps = CLOCK_CAP_RATE_44100 |
dice               92 sound/firewire/dice/dice.c static void dice_card_strings(struct snd_dice *dice)
dice               94 sound/firewire/dice/dice.c 	struct snd_card *card = dice->card;
dice               95 sound/firewire/dice/dice.c 	struct fw_device *dev = fw_parent_device(dice->unit);
dice              104 sound/firewire/dice/dice.c 	err = snd_dice_transaction_read_global(dice, GLOBAL_NICK_NAME,
dice              118 sound/firewire/dice/dice.c 	fw_csr_string(dice->unit->directory, CSR_MODEL, model, sizeof(model));
dice              122 sound/firewire/dice/dice.c 		 dev_name(&dice->unit->device), 100 << dev->max_speed);
dice              129 sound/firewire/dice/dice.c 	struct snd_dice *dice = card->private_data;
dice              131 sound/firewire/dice/dice.c 	snd_dice_stream_destroy_duplex(dice);
dice              132 sound/firewire/dice/dice.c 	snd_dice_transaction_destroy(dice);
dice              137 sound/firewire/dice/dice.c 	struct snd_dice *dice = container_of(work, struct snd_dice, dwork.work);
dice              140 sound/firewire/dice/dice.c 	if (dice->registered)
dice              143 sound/firewire/dice/dice.c 	err = snd_card_new(&dice->unit->device, -1, NULL, THIS_MODULE, 0,
dice              144 sound/firewire/dice/dice.c 			   &dice->card);
dice              147 sound/firewire/dice/dice.c 	dice->card->private_free = dice_card_free;
dice              148 sound/firewire/dice/dice.c 	dice->card->private_data = dice;
dice              150 sound/firewire/dice/dice.c 	err = snd_dice_transaction_init(dice);
dice              154 sound/firewire/dice/dice.c 	err = check_clock_caps(dice);
dice              158 sound/firewire/dice/dice.c 	dice_card_strings(dice);
dice              160 sound/firewire/dice/dice.c 	err = dice->detect_formats(dice);
dice              164 sound/firewire/dice/dice.c 	err = snd_dice_stream_init_duplex(dice);
dice              168 sound/firewire/dice/dice.c 	snd_dice_create_proc(dice);
dice              170 sound/firewire/dice/dice.c 	err = snd_dice_create_pcm(dice);
dice              174 sound/firewire/dice/dice.c 	err = snd_dice_create_midi(dice);
dice              178 sound/firewire/dice/dice.c 	err = snd_dice_create_hwdep(dice);
dice              182 sound/firewire/dice/dice.c 	err = snd_card_register(dice->card);
dice              186 sound/firewire/dice/dice.c 	dice->registered = true;
dice              190 sound/firewire/dice/dice.c 	snd_card_free(dice->card);
dice              191 sound/firewire/dice/dice.c 	dev_info(&dice->unit->device,
dice              198 sound/firewire/dice/dice.c 	struct snd_dice *dice;
dice              208 sound/firewire/dice/dice.c 	dice = devm_kzalloc(&unit->device, sizeof(struct snd_dice), GFP_KERNEL);
dice              209 sound/firewire/dice/dice.c 	if (!dice)
dice              211 sound/firewire/dice/dice.c 	dice->unit = fw_unit_get(unit);
dice              212 sound/firewire/dice/dice.c 	dev_set_drvdata(&unit->device, dice);
dice              215 sound/firewire/dice/dice.c 		dice->detect_formats = snd_dice_stream_detect_current_formats;
dice              217 sound/firewire/dice/dice.c 		dice->detect_formats =
dice              221 sound/firewire/dice/dice.c 	spin_lock_init(&dice->lock);
dice              222 sound/firewire/dice/dice.c 	mutex_init(&dice->mutex);
dice              223 sound/firewire/dice/dice.c 	init_completion(&dice->clock_accepted);
dice              224 sound/firewire/dice/dice.c 	init_waitqueue_head(&dice->hwdep_wait);
dice              227 sound/firewire/dice/dice.c 	INIT_DEFERRABLE_WORK(&dice->dwork, do_registration);
dice              228 sound/firewire/dice/dice.c 	snd_fw_schedule_registration(unit, &dice->dwork);
dice              235 sound/firewire/dice/dice.c 	struct snd_dice *dice = dev_get_drvdata(&unit->device);
dice              242 sound/firewire/dice/dice.c 	cancel_delayed_work_sync(&dice->dwork);
dice              244 sound/firewire/dice/dice.c 	if (dice->registered) {
dice              246 sound/firewire/dice/dice.c 		snd_card_free(dice->card);
dice              249 sound/firewire/dice/dice.c 	mutex_destroy(&dice->mutex);
dice              250 sound/firewire/dice/dice.c 	fw_unit_put(dice->unit);
dice              255 sound/firewire/dice/dice.c 	struct snd_dice *dice = dev_get_drvdata(&unit->device);
dice              258 sound/firewire/dice/dice.c 	if (!dice->registered)
dice              259 sound/firewire/dice/dice.c 		snd_fw_schedule_registration(unit, &dice->dwork);
dice              262 sound/firewire/dice/dice.c 	snd_dice_transaction_reinit(dice);
dice              268 sound/firewire/dice/dice.c 	if (dice->registered) {
dice              269 sound/firewire/dice/dice.c 		mutex_lock(&dice->mutex);
dice              270 sound/firewire/dice/dice.c 		snd_dice_stream_update_duplex(dice);
dice              271 sound/firewire/dice/dice.c 		mutex_unlock(&dice->mutex);
dice               73 sound/firewire/dice/dice.h typedef int (*snd_dice_detect_formats_t)(struct snd_dice *dice);
dice              128 sound/firewire/dice/dice.h int snd_dice_transaction_write(struct snd_dice *dice,
dice              132 sound/firewire/dice/dice.h int snd_dice_transaction_read(struct snd_dice *dice,
dice              136 sound/firewire/dice/dice.h static inline int snd_dice_transaction_write_global(struct snd_dice *dice,
dice              140 sound/firewire/dice/dice.h 	return snd_dice_transaction_write(dice,
dice              144 sound/firewire/dice/dice.h static inline int snd_dice_transaction_read_global(struct snd_dice *dice,
dice              148 sound/firewire/dice/dice.h 	return snd_dice_transaction_read(dice,
dice              152 sound/firewire/dice/dice.h static inline int snd_dice_transaction_write_tx(struct snd_dice *dice,
dice              156 sound/firewire/dice/dice.h 	return snd_dice_transaction_write(dice, SND_DICE_ADDR_TYPE_TX, offset,
dice              159 sound/firewire/dice/dice.h static inline int snd_dice_transaction_read_tx(struct snd_dice *dice,
dice              163 sound/firewire/dice/dice.h 	return snd_dice_transaction_read(dice, SND_DICE_ADDR_TYPE_TX, offset,
dice              166 sound/firewire/dice/dice.h static inline int snd_dice_transaction_write_rx(struct snd_dice *dice,
dice              170 sound/firewire/dice/dice.h 	return snd_dice_transaction_write(dice, SND_DICE_ADDR_TYPE_RX, offset,
dice              173 sound/firewire/dice/dice.h static inline int snd_dice_transaction_read_rx(struct snd_dice *dice,
dice              177 sound/firewire/dice/dice.h 	return snd_dice_transaction_read(dice, SND_DICE_ADDR_TYPE_RX, offset,
dice              180 sound/firewire/dice/dice.h static inline int snd_dice_transaction_write_sync(struct snd_dice *dice,
dice              184 sound/firewire/dice/dice.h 	return snd_dice_transaction_write(dice, SND_DICE_ADDR_TYPE_SYNC, offset,
dice              187 sound/firewire/dice/dice.h static inline int snd_dice_transaction_read_sync(struct snd_dice *dice,
dice              191 sound/firewire/dice/dice.h 	return snd_dice_transaction_read(dice, SND_DICE_ADDR_TYPE_SYNC, offset,
dice              195 sound/firewire/dice/dice.h int snd_dice_transaction_get_clock_source(struct snd_dice *dice,
dice              197 sound/firewire/dice/dice.h int snd_dice_transaction_get_rate(struct snd_dice *dice, unsigned int *rate);
dice              198 sound/firewire/dice/dice.h int snd_dice_transaction_set_enable(struct snd_dice *dice);
dice              199 sound/firewire/dice/dice.h void snd_dice_transaction_clear_enable(struct snd_dice *dice);
dice              200 sound/firewire/dice/dice.h int snd_dice_transaction_init(struct snd_dice *dice);
dice              201 sound/firewire/dice/dice.h int snd_dice_transaction_reinit(struct snd_dice *dice);
dice              202 sound/firewire/dice/dice.h void snd_dice_transaction_destroy(struct snd_dice *dice);
dice              207 sound/firewire/dice/dice.h int snd_dice_stream_get_rate_mode(struct snd_dice *dice, unsigned int rate,
dice              209 sound/firewire/dice/dice.h int snd_dice_stream_start_duplex(struct snd_dice *dice);
dice              210 sound/firewire/dice/dice.h void snd_dice_stream_stop_duplex(struct snd_dice *dice);
dice              211 sound/firewire/dice/dice.h int snd_dice_stream_init_duplex(struct snd_dice *dice);
dice              212 sound/firewire/dice/dice.h void snd_dice_stream_destroy_duplex(struct snd_dice *dice);
dice              213 sound/firewire/dice/dice.h int snd_dice_stream_reserve_duplex(struct snd_dice *dice, unsigned int rate);
dice              214 sound/firewire/dice/dice.h void snd_dice_stream_update_duplex(struct snd_dice *dice);
dice              215 sound/firewire/dice/dice.h int snd_dice_stream_detect_current_formats(struct snd_dice *dice);
dice              217 sound/firewire/dice/dice.h int snd_dice_stream_lock_try(struct snd_dice *dice);
dice              218 sound/firewire/dice/dice.h void snd_dice_stream_lock_release(struct snd_dice *dice);
dice              220 sound/firewire/dice/dice.h int snd_dice_create_pcm(struct snd_dice *dice);
dice              222 sound/firewire/dice/dice.h int snd_dice_create_hwdep(struct snd_dice *dice);
dice              224 sound/firewire/dice/dice.h void snd_dice_create_proc(struct snd_dice *dice);
dice              226 sound/firewire/dice/dice.h int snd_dice_create_midi(struct snd_dice *dice);
dice              228 sound/firewire/dice/dice.h int snd_dice_detect_tcelectronic_formats(struct snd_dice *dice);
dice              229 sound/firewire/dice/dice.h int snd_dice_detect_alesis_formats(struct snd_dice *dice);
dice              230 sound/firewire/dice/dice.h int snd_dice_detect_extension_formats(struct snd_dice *dice);
dice              231 sound/firewire/dice/dice.h int snd_dice_detect_mytek_formats(struct snd_dice *dice);
dice              232 sound/firewire/dice/dice.h int snd_dice_detect_presonus_formats(struct snd_dice *dice);