00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
00046 struct snd_card *card;
00047 struct most_dev *most_dev;
00048 struct snd_pcm *pcm;
00050
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
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