hxcodec.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #ifndef _DEV_HXCODEC_H_
  2. #define _DEV_HXCODEC_H_
  3. /*
  4. * Copyright (C) 2001-2007 by egnite Software GmbH. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the name of the copyright holders nor the names of
  16. * contributors may be used to endorse or promote products derived
  17. * from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  23. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. * SUCH DAMAGE.
  31. *
  32. * For additional information see http://www.ethernut.de/
  33. */
  34. /*
  35. * $Id: hxcodec.h 4477 2012-08-20 17:50:01Z haraldkipp $
  36. */
  37. #include <cfg/audio.h>
  38. #include <sys/device.h>
  39. /*!
  40. * \file dev/hxcodec.h
  41. * \brief Helix decoder definitions.
  42. */
  43. /*!
  44. * \addtogroup xgHelixCodec
  45. */
  46. /*@{*/
  47. /* DAC min/max gain in dB. */
  48. #ifndef AUDIO_DAC_MIN_GAIN
  49. #define AUDIO_DAC_MIN_GAIN -73
  50. #endif
  51. #ifndef AUDIO_DAC_MAX_GAIN
  52. #define AUDIO_DAC_MAX_GAIN 6
  53. #endif
  54. /*
  55. * I/O control codes.
  56. */
  57. /*
  58. * I/O control codes.
  59. */
  60. #define AUDIO_SETWRITETIMEOUT 0x010d
  61. #define AUDIO_GETWRITETIMEOUT 0x010e
  62. /*! \brief Immediately start playing. */
  63. #define AUDIO_PLAY 0x3001
  64. /*! \brief Immediately stop playing and discard buffer. */
  65. #define AUDIO_CANCEL 0x3002
  66. #define AUDIO_GET_STATUS 0x3003
  67. #define AUDIO_GET_PLAYGAIN 0x3004
  68. #define AUDIO_SET_PLAYGAIN 0x3005
  69. #define AUDIO_GET_PBSIZE 0x3006
  70. #define AUDIO_SET_PBSIZE 0x3007
  71. #define AUDIO_GET_PBLEVEL 0x3008
  72. #define AUDIO_GET_PBWLOW 0x3009
  73. #define AUDIO_SET_PBWLOW 0x300A
  74. #define AUDIO_GET_PBWHIGH 0x300B
  75. #define AUDIO_SET_PBWHIGH 0x300C
  76. #define AUDIO_BEEP 0x300F
  77. /*! \brief Retrieve decoder information. */
  78. #define AUDIO_GET_DECINFO 0x3010
  79. /*! \brief Retrieve decoder capabilities. */
  80. #define AUDIO_GET_DECCAPS 0x3011
  81. /*! \brief Retrieve decoder formats. */
  82. #define AUDIO_GET_DECFMTS 0x3012
  83. /*! \brief Enable or disable specific decoder formats. */
  84. #define AUDIO_SET_DECFMTS 0x3013
  85. /*! \brief Retrieve encoder information. */
  86. #define AUDIO_GET_CODINFO 0x3014
  87. /*! \brief Retrieve encoder capabilities. */
  88. #define AUDIO_GET_CODCAPS 0x3015
  89. /*! \brief Retrieve encoder formats. */
  90. #define AUDIO_GET_CODFMTS 0x3016
  91. /*! \brief Enable or disable specific encoder formats. */
  92. #define AUDIO_SET_CODFMTS 0x3017
  93. /*! \brief Retrieve midi information. */
  94. #define AUDIO_GET_MIDINFO 0x3018
  95. /*! \brief Retrieve midi capabilities. */
  96. #define AUDIO_GET_MIDCAPS 0x3019
  97. /*
  98. * Status of the decoder
  99. */
  100. #define CODEC_STATUS_IDLE 0
  101. #define CODEC_STATUS_PLAYING 1
  102. extern NUTDEVICE devHelixCodec;
  103. /*@}*/
  104. #endif