hmidi            1315 sound/pci/rme9652/hdsp.c static int snd_hdsp_midi_output_write (struct hdsp_midi *hmidi)
hmidi            1325 sound/pci/rme9652/hdsp.c 	spin_lock_irqsave (&hmidi->lock, flags);
hmidi            1326 sound/pci/rme9652/hdsp.c 	if (hmidi->output) {
hmidi            1327 sound/pci/rme9652/hdsp.c 		if (!snd_rawmidi_transmit_empty (hmidi->output)) {
hmidi            1328 sound/pci/rme9652/hdsp.c 			if ((n_pending = snd_hdsp_midi_output_possible (hmidi->hdsp, hmidi->id)) > 0) {
hmidi            1332 sound/pci/rme9652/hdsp.c 				if ((to_write = snd_rawmidi_transmit (hmidi->output, buf, n_pending)) > 0) {
hmidi            1334 sound/pci/rme9652/hdsp.c 						snd_hdsp_midi_write_byte (hmidi->hdsp, hmidi->id, buf[i]);
hmidi            1339 sound/pci/rme9652/hdsp.c 	spin_unlock_irqrestore (&hmidi->lock, flags);
hmidi            1343 sound/pci/rme9652/hdsp.c static int snd_hdsp_midi_input_read (struct hdsp_midi *hmidi)
hmidi            1350 sound/pci/rme9652/hdsp.c 	spin_lock_irqsave (&hmidi->lock, flags);
hmidi            1351 sound/pci/rme9652/hdsp.c 	if ((n_pending = snd_hdsp_midi_input_available (hmidi->hdsp, hmidi->id)) > 0) {
hmidi            1352 sound/pci/rme9652/hdsp.c 		if (hmidi->input) {
hmidi            1356 sound/pci/rme9652/hdsp.c 				buf[i] = snd_hdsp_midi_read_byte (hmidi->hdsp, hmidi->id);
hmidi            1358 sound/pci/rme9652/hdsp.c 				snd_rawmidi_receive (hmidi->input, buf, n_pending);
hmidi            1362 sound/pci/rme9652/hdsp.c 				snd_hdsp_midi_read_byte (hmidi->hdsp, hmidi->id);
hmidi            1365 sound/pci/rme9652/hdsp.c 	hmidi->pending = 0;
hmidi            1366 sound/pci/rme9652/hdsp.c 	if (hmidi->id)
hmidi            1367 sound/pci/rme9652/hdsp.c 		hmidi->hdsp->control_register |= HDSP_Midi1InterruptEnable;
hmidi            1369 sound/pci/rme9652/hdsp.c 		hmidi->hdsp->control_register |= HDSP_Midi0InterruptEnable;
hmidi            1370 sound/pci/rme9652/hdsp.c 	hdsp_write(hmidi->hdsp, HDSP_controlRegister, hmidi->hdsp->control_register);
hmidi            1371 sound/pci/rme9652/hdsp.c 	spin_unlock_irqrestore (&hmidi->lock, flags);
hmidi            1372 sound/pci/rme9652/hdsp.c 	return snd_hdsp_midi_output_write (hmidi);
hmidi            1378 sound/pci/rme9652/hdsp.c 	struct hdsp_midi *hmidi;
hmidi            1382 sound/pci/rme9652/hdsp.c 	hmidi = (struct hdsp_midi *) substream->rmidi->private_data;
hmidi            1383 sound/pci/rme9652/hdsp.c 	hdsp = hmidi->hdsp;
hmidi            1384 sound/pci/rme9652/hdsp.c 	ie = hmidi->id ? HDSP_Midi1InterruptEnable : HDSP_Midi0InterruptEnable;
hmidi            1388 sound/pci/rme9652/hdsp.c 			snd_hdsp_flush_midi_input (hdsp, hmidi->id);
hmidi            1402 sound/pci/rme9652/hdsp.c 	struct hdsp_midi *hmidi = from_timer(hmidi, t, timer);
hmidi            1405 sound/pci/rme9652/hdsp.c 	snd_hdsp_midi_output_write(hmidi);
hmidi            1406 sound/pci/rme9652/hdsp.c 	spin_lock_irqsave (&hmidi->lock, flags);
hmidi            1414 sound/pci/rme9652/hdsp.c 	if (hmidi->istimer)
hmidi            1415 sound/pci/rme9652/hdsp.c 		mod_timer(&hmidi->timer, 1 + jiffies);
hmidi            1417 sound/pci/rme9652/hdsp.c 	spin_unlock_irqrestore (&hmidi->lock, flags);
hmidi            1422 sound/pci/rme9652/hdsp.c 	struct hdsp_midi *hmidi;
hmidi            1425 sound/pci/rme9652/hdsp.c 	hmidi = (struct hdsp_midi *) substream->rmidi->private_data;
hmidi            1426 sound/pci/rme9652/hdsp.c 	spin_lock_irqsave (&hmidi->lock, flags);
hmidi            1428 sound/pci/rme9652/hdsp.c 		if (!hmidi->istimer) {
hmidi            1429 sound/pci/rme9652/hdsp.c 			timer_setup(&hmidi->timer, snd_hdsp_midi_output_timer,
hmidi            1431 sound/pci/rme9652/hdsp.c 			mod_timer(&hmidi->timer, 1 + jiffies);
hmidi            1432 sound/pci/rme9652/hdsp.c 			hmidi->istimer++;
hmidi            1435 sound/pci/rme9652/hdsp.c 		if (hmidi->istimer && --hmidi->istimer <= 0)
hmidi            1436 sound/pci/rme9652/hdsp.c 			del_timer (&hmidi->timer);
hmidi            1438 sound/pci/rme9652/hdsp.c 	spin_unlock_irqrestore (&hmidi->lock, flags);
hmidi            1440 sound/pci/rme9652/hdsp.c 		snd_hdsp_midi_output_write(hmidi);
hmidi            1445 sound/pci/rme9652/hdsp.c 	struct hdsp_midi *hmidi;
hmidi            1447 sound/pci/rme9652/hdsp.c 	hmidi = (struct hdsp_midi *) substream->rmidi->private_data;
hmidi            1448 sound/pci/rme9652/hdsp.c 	spin_lock_irq (&hmidi->lock);
hmidi            1449 sound/pci/rme9652/hdsp.c 	snd_hdsp_flush_midi_input (hmidi->hdsp, hmidi->id);
hmidi            1450 sound/pci/rme9652/hdsp.c 	hmidi->input = substream;
hmidi            1451 sound/pci/rme9652/hdsp.c 	spin_unlock_irq (&hmidi->lock);
hmidi            1458 sound/pci/rme9652/hdsp.c 	struct hdsp_midi *hmidi;
hmidi            1460 sound/pci/rme9652/hdsp.c 	hmidi = (struct hdsp_midi *) substream->rmidi->private_data;
hmidi            1461 sound/pci/rme9652/hdsp.c 	spin_lock_irq (&hmidi->lock);
hmidi            1462 sound/pci/rme9652/hdsp.c 	hmidi->output = substream;
hmidi            1463 sound/pci/rme9652/hdsp.c 	spin_unlock_irq (&hmidi->lock);
hmidi            1470 sound/pci/rme9652/hdsp.c 	struct hdsp_midi *hmidi;
hmidi            1474 sound/pci/rme9652/hdsp.c 	hmidi = (struct hdsp_midi *) substream->rmidi->private_data;
hmidi            1475 sound/pci/rme9652/hdsp.c 	spin_lock_irq (&hmidi->lock);
hmidi            1476 sound/pci/rme9652/hdsp.c 	hmidi->input = NULL;
hmidi            1477 sound/pci/rme9652/hdsp.c 	spin_unlock_irq (&hmidi->lock);
hmidi            1484 sound/pci/rme9652/hdsp.c 	struct hdsp_midi *hmidi;
hmidi            1488 sound/pci/rme9652/hdsp.c 	hmidi = (struct hdsp_midi *) substream->rmidi->private_data;
hmidi            1489 sound/pci/rme9652/hdsp.c 	spin_lock_irq (&hmidi->lock);
hmidi            1490 sound/pci/rme9652/hdsp.c 	hmidi->output = NULL;
hmidi            1491 sound/pci/rme9652/hdsp.c 	spin_unlock_irq (&hmidi->lock);
hmidi            1842 sound/pci/rme9652/hdspm.c static int snd_hdspm_midi_output_write (struct hdspm_midi *hmidi)
hmidi            1852 sound/pci/rme9652/hdspm.c 	spin_lock_irqsave (&hmidi->lock, flags);
hmidi            1853 sound/pci/rme9652/hdspm.c 	if (hmidi->output &&
hmidi            1854 sound/pci/rme9652/hdspm.c 	    !snd_rawmidi_transmit_empty (hmidi->output)) {
hmidi            1855 sound/pci/rme9652/hdspm.c 		n_pending = snd_hdspm_midi_output_possible (hmidi->hdspm,
hmidi            1856 sound/pci/rme9652/hdspm.c 							    hmidi->id);
hmidi            1861 sound/pci/rme9652/hdspm.c 			to_write = snd_rawmidi_transmit (hmidi->output, buf,
hmidi            1865 sound/pci/rme9652/hdspm.c 					snd_hdspm_midi_write_byte (hmidi->hdspm,
hmidi            1866 sound/pci/rme9652/hdspm.c 								   hmidi->id,
hmidi            1871 sound/pci/rme9652/hdspm.c 	spin_unlock_irqrestore (&hmidi->lock, flags);
hmidi            1875 sound/pci/rme9652/hdspm.c static int snd_hdspm_midi_input_read (struct hdspm_midi *hmidi)
hmidi            1884 sound/pci/rme9652/hdspm.c 	spin_lock_irqsave (&hmidi->lock, flags);
hmidi            1885 sound/pci/rme9652/hdspm.c 	n_pending = snd_hdspm_midi_input_available (hmidi->hdspm, hmidi->id);
hmidi            1887 sound/pci/rme9652/hdspm.c 		if (hmidi->input) {
hmidi            1891 sound/pci/rme9652/hdspm.c 				buf[i] = snd_hdspm_midi_read_byte (hmidi->hdspm,
hmidi            1892 sound/pci/rme9652/hdspm.c 								   hmidi->id);
hmidi            1894 sound/pci/rme9652/hdspm.c 				snd_rawmidi_receive (hmidi->input, buf,
hmidi            1899 sound/pci/rme9652/hdspm.c 				snd_hdspm_midi_read_byte (hmidi->hdspm,
hmidi            1900 sound/pci/rme9652/hdspm.c 							  hmidi->id);
hmidi            1903 sound/pci/rme9652/hdspm.c 	hmidi->pending = 0;
hmidi            1904 sound/pci/rme9652/hdspm.c 	spin_unlock_irqrestore(&hmidi->lock, flags);
hmidi            1906 sound/pci/rme9652/hdspm.c 	spin_lock_irqsave(&hmidi->hdspm->lock, flags);
hmidi            1907 sound/pci/rme9652/hdspm.c 	hmidi->hdspm->control_register |= hmidi->ie;
hmidi            1908 sound/pci/rme9652/hdspm.c 	hdspm_write(hmidi->hdspm, HDSPM_controlRegister,
hmidi            1909 sound/pci/rme9652/hdspm.c 		    hmidi->hdspm->control_register);
hmidi            1910 sound/pci/rme9652/hdspm.c 	spin_unlock_irqrestore(&hmidi->hdspm->lock, flags);
hmidi            1912 sound/pci/rme9652/hdspm.c 	return snd_hdspm_midi_output_write (hmidi);
hmidi            1919 sound/pci/rme9652/hdspm.c 	struct hdspm_midi *hmidi;
hmidi            1922 sound/pci/rme9652/hdspm.c 	hmidi = substream->rmidi->private_data;
hmidi            1923 sound/pci/rme9652/hdspm.c 	hdspm = hmidi->hdspm;
hmidi            1927 sound/pci/rme9652/hdspm.c 		if (!(hdspm->control_register & hmidi->ie)) {
hmidi            1928 sound/pci/rme9652/hdspm.c 			snd_hdspm_flush_midi_input (hdspm, hmidi->id);
hmidi            1929 sound/pci/rme9652/hdspm.c 			hdspm->control_register |= hmidi->ie;
hmidi            1932 sound/pci/rme9652/hdspm.c 		hdspm->control_register &= ~hmidi->ie;
hmidi            1941 sound/pci/rme9652/hdspm.c 	struct hdspm_midi *hmidi = from_timer(hmidi, t, timer);
hmidi            1944 sound/pci/rme9652/hdspm.c 	snd_hdspm_midi_output_write(hmidi);
hmidi            1945 sound/pci/rme9652/hdspm.c 	spin_lock_irqsave (&hmidi->lock, flags);
hmidi            1953 sound/pci/rme9652/hdspm.c 	if (hmidi->istimer)
hmidi            1954 sound/pci/rme9652/hdspm.c 		mod_timer(&hmidi->timer, 1 + jiffies);
hmidi            1956 sound/pci/rme9652/hdspm.c 	spin_unlock_irqrestore (&hmidi->lock, flags);
hmidi            1962 sound/pci/rme9652/hdspm.c 	struct hdspm_midi *hmidi;
hmidi            1965 sound/pci/rme9652/hdspm.c 	hmidi = substream->rmidi->private_data;
hmidi            1966 sound/pci/rme9652/hdspm.c 	spin_lock_irqsave (&hmidi->lock, flags);
hmidi            1968 sound/pci/rme9652/hdspm.c 		if (!hmidi->istimer) {
hmidi            1969 sound/pci/rme9652/hdspm.c 			timer_setup(&hmidi->timer,
hmidi            1971 sound/pci/rme9652/hdspm.c 			mod_timer(&hmidi->timer, 1 + jiffies);
hmidi            1972 sound/pci/rme9652/hdspm.c 			hmidi->istimer++;
hmidi            1975 sound/pci/rme9652/hdspm.c 		if (hmidi->istimer && --hmidi->istimer <= 0)
hmidi            1976 sound/pci/rme9652/hdspm.c 			del_timer (&hmidi->timer);
hmidi            1978 sound/pci/rme9652/hdspm.c 	spin_unlock_irqrestore (&hmidi->lock, flags);
hmidi            1980 sound/pci/rme9652/hdspm.c 		snd_hdspm_midi_output_write(hmidi);
hmidi            1985 sound/pci/rme9652/hdspm.c 	struct hdspm_midi *hmidi;
hmidi            1987 sound/pci/rme9652/hdspm.c 	hmidi = substream->rmidi->private_data;
hmidi            1988 sound/pci/rme9652/hdspm.c 	spin_lock_irq (&hmidi->lock);
hmidi            1989 sound/pci/rme9652/hdspm.c 	snd_hdspm_flush_midi_input (hmidi->hdspm, hmidi->id);
hmidi            1990 sound/pci/rme9652/hdspm.c 	hmidi->input = substream;
hmidi            1991 sound/pci/rme9652/hdspm.c 	spin_unlock_irq (&hmidi->lock);
hmidi            1998 sound/pci/rme9652/hdspm.c 	struct hdspm_midi *hmidi;
hmidi            2000 sound/pci/rme9652/hdspm.c 	hmidi = substream->rmidi->private_data;
hmidi            2001 sound/pci/rme9652/hdspm.c 	spin_lock_irq (&hmidi->lock);
hmidi            2002 sound/pci/rme9652/hdspm.c 	hmidi->output = substream;
hmidi            2003 sound/pci/rme9652/hdspm.c 	spin_unlock_irq (&hmidi->lock);
hmidi            2010 sound/pci/rme9652/hdspm.c 	struct hdspm_midi *hmidi;
hmidi            2014 sound/pci/rme9652/hdspm.c 	hmidi = substream->rmidi->private_data;
hmidi            2015 sound/pci/rme9652/hdspm.c 	spin_lock_irq (&hmidi->lock);
hmidi            2016 sound/pci/rme9652/hdspm.c 	hmidi->input = NULL;
hmidi            2017 sound/pci/rme9652/hdspm.c 	spin_unlock_irq (&hmidi->lock);
hmidi            2024 sound/pci/rme9652/hdspm.c 	struct hdspm_midi *hmidi;
hmidi            2028 sound/pci/rme9652/hdspm.c 	hmidi = substream->rmidi->private_data;
hmidi            2029 sound/pci/rme9652/hdspm.c 	spin_lock_irq (&hmidi->lock);
hmidi            2030 sound/pci/rme9652/hdspm.c 	hmidi->output = NULL;
hmidi            2031 sound/pci/rme9652/hdspm.c 	spin_unlock_irq (&hmidi->lock);