/home/hillier_g/checkout/most4linux/most-kernel/most-alsa.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright(c) Siemens AG, Muenchen, Germany, 2005, 2006, 2007
00003  *                           Bernhard Walle <bernhard.walle@gmx.de>
00004  *                           Gernot Hillier <gernot.hillier@siemens.com>
00005  *
00006  * ----------------------------------------------------------------------------
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License version 2 as 
00009  * published by the Free Software Foundation;
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  * ----------------------------------------------------------------------------
00020  */
00021 #ifdef HAVE_CONFIG_H
00022 #include "config/config.h"
00023 #endif
00024 #ifndef MOST_ALSA_H
00025 #define MOST_ALSA_H
00026 
00027 #include <sound/driver.h>
00028 #include <sound/core.h>
00029 #include <sound/pcm.h>
00030 
00044 struct most_alsa_dev {
00045     /* --- general members -------------------------------------------------- */
00046     struct snd_card      *card;                 
00047     struct most_dev      *most_dev;             
00048     struct snd_pcm       *pcm;                  
00050     /* --- members for playback --------------------------------------------- */
00051     struct snd_pcm_substream  *p_substream;      
00052     atomic_t             p_cur_period;      
00055     volatile bool        p_silent;          
00058     int                  p_thread_id;       
00060     struct completion    p_completion;      
00063     struct semaphore     p_event;           
00068     struct semaphore     p_buffer_mutex;    
00073     struct semaphore     p_thread_sema;     
00077     struct semaphore     p_buf_setup_sema;  
00080     /* --- members for capturing -------------------------------------------- */
00081     struct snd_pcm_substream  *c_substream;      
00082     atomic_t             c_cur_period;      
00085     volatile bool        c_silent;          
00088     int                  c_thread_id;       
00090     struct completion    c_completion;      
00093     struct semaphore     c_buffer_mutex;    
00098     struct semaphore     c_thread_sema;     
00102     struct semaphore     c_buf_setup_sema;  
00104 };
00105 
00106 
00110 #define ALSA_DEV(card)              \
00111     (struct most_alsa_dev *)((card)->private_data)
00112 
00113 #endif /* MOST_ALSA_H */

Generated on Fri Mar 9 14:48:57 2007 for MOST Linux Drivers (Linux and RTAI) by  doxygen 1.5.0