00001 /* 00002 Copyright (C) 2001 Paul Davis 00003 Copyright (C) 2004 Karsten Wiese, Rui Nuno Capela 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 00019 $Id: usx2y.h 855 2004-12-28 05:50:18Z joq $ 00020 */ 00021 00022 #ifndef __jack_usx2y_h__ 00023 #define __jack_usx2y_h__ 00024 00025 #define USX2Y_MAXPACK 50 00026 #define USX2Y_MAXBUFFERMS 100 00027 #define USX2Y_MAXSTRIDE 3 00028 00029 #define USX2Y_SSS (((USX2Y_MAXPACK * USX2Y_MAXBUFFERMS * USX2Y_MAXSTRIDE + 4096) / 4096) * 4096) 00030 00031 struct snd_usX2Y_hwdep_pcm_shm { 00032 char playback[USX2Y_SSS]; 00033 char capture0x8[USX2Y_SSS]; 00034 char capture0xA[USX2Y_SSS]; 00035 volatile int playback_iso_head; 00036 int playback_iso_start; 00037 struct { 00038 int frame, 00039 offset, 00040 length; 00041 } captured_iso[128]; 00042 volatile int captured_iso_head; 00043 volatile unsigned captured_iso_frames; 00044 int capture_iso_start; 00045 }; 00046 typedef struct snd_usX2Y_hwdep_pcm_shm snd_usX2Y_hwdep_pcm_shm_t; 00047 00048 typedef struct { 00049 alsa_driver_t *driver; 00050 snd_hwdep_t *hwdep_handle; 00051 struct pollfd pfds; 00052 struct snd_usX2Y_hwdep_pcm_shm *hwdep_pcm_shm; 00053 int playback_iso_start; 00054 int playback_iso_bytes_done; 00055 int capture_iso_start; 00056 int capture_iso_bytes_done; 00057 } usx2y_t; 00058 00059 jack_hardware_t * 00060 jack_alsa_usx2y_hw_new (alsa_driver_t *driver); 00061 00062 #endif /* __jack_usx2y_h__*/