Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:43

0001 /**
0002  * @file
0003  * @ingroup lm32_milkymist_ac97 RTEMSBSPsLM32SharedMilkymistOne
0004  * @brief Milkymist AC97 driver
0005  */
0006 
0007 /*  milkymist_ac97.h
0008  *
0009  *  Milkymist AC97 driver for RTEMS
0010  *
0011  *  The license and distribution terms for this file may be
0012  *  found in the file LICENSE in this distribution or at
0013  *  http://www.rtems.org/license/LICENSE.
0014  *
0015  *  COPYRIGHT (c) 2010 Sebastien Bourdeauducq
0016  */
0017 
0018 /**
0019  * @defgroup lm32_milkymist_ac97 Milkymist AC97
0020  * @ingroup RTEMSBSPsLM32SharedMilkymistOne
0021  * @brief Milkymist AC97 driver
0022  * @{
0023  */
0024 
0025 #ifndef __MILKYMIST_AC97_H_
0026 #define __MILKYMIST_AC97_H_
0027 
0028 #ifdef __cplusplus
0029 extern "C" {
0030 #endif
0031 
0032 /* Ioctls. 0x41 is 'A' */
0033 #define SOUND_MIXER_MIC             0x0
0034 #define SOUND_MIXER_LINE            0x1
0035 #define SOUND_MIXER_READ(x)         (0x4100+x)
0036 #define SOUND_MIXER_WRITE(x)        (0x4110+x)
0037 
0038 #define SOUND_SND_SUBMIT_PLAY       0x4120
0039 #define SOUND_SND_COLLECT_PLAY      0x4121
0040 #define SOUND_SND_SUBMIT_RECORD     0x4122
0041 #define SOUND_SND_COLLECT_RECORD    0x4123
0042 
0043 struct snd_buffer {
0044   unsigned int nsamples;
0045   void *user;
0046   unsigned int samples[];
0047 };
0048 
0049 rtems_device_driver ac97_initialize(
0050   rtems_device_major_number major,
0051   rtems_device_minor_number minor,
0052   void *arg
0053 );
0054 
0055 rtems_device_driver ac97_open(
0056   rtems_device_major_number major,
0057   rtems_device_minor_number minor,
0058   void *arg
0059 );
0060 
0061 rtems_device_driver ac97_control(
0062   rtems_device_major_number major,
0063   rtems_device_minor_number minor,
0064   void *arg
0065 );
0066 
0067 #define AC97_DRIVER_TABLE_ENTRY {ac97_initialize, \
0068 ac97_open, NULL, NULL, NULL, ac97_control}
0069 
0070 /** @} */
0071 
0072 #ifdef __cplusplus
0073 }
0074 #endif
0075 
0076 #endif /* __MILKYMIST_AC97_H_ */