]> git.alsa-project.org Git - tinycompress.git/commitdiff
tinycompress: remove usage of SNDRV_RATE_xxx
authorVinod Koul <vinod.koul@intel.com>
Mon, 16 Dec 2013 15:07:24 +0000 (20:37 +0530)
committerVinod Koul <vinod.koul@intel.com>
Mon, 16 Dec 2013 15:07:24 +0000 (20:37 +0530)
as now it is not to be used for passing the sampling rate

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
include/tinycompress/tinycompress.h
utils.c

index 40de69a6438a9dc6153bd6b6e3e101bd51e5dd4f..e340cca45cf1efa042d3dad35eccf164c8352bf7 100644 (file)
@@ -269,25 +269,5 @@ int is_compress_ready(struct compress *compress);
 
 /* Returns a human readable reason for the last error */
 const char *compress_get_error(struct compress *compress);
-/*
- * since the SNDRV_PCM_RATE_* is not availble anywhere in userspace
- * and we have used these to define the sampling rate, we need to define
- * then here
- */
-#define SNDRV_PCM_RATE_5512            (1<<0)          /* 5512Hz */
-#define SNDRV_PCM_RATE_8000            (1<<1)          /* 8000Hz */
-#define SNDRV_PCM_RATE_11025           (1<<2)          /* 11025Hz */
-#define SNDRV_PCM_RATE_16000           (1<<3)          /* 16000Hz */
-#define SNDRV_PCM_RATE_22050           (1<<4)          /* 22050Hz */
-#define SNDRV_PCM_RATE_32000           (1<<5)          /* 32000Hz */
-#define SNDRV_PCM_RATE_44100           (1<<6)          /* 44100Hz */
-#define SNDRV_PCM_RATE_48000           (1<<7)          /* 48000Hz */
-#define SNDRV_PCM_RATE_64000           (1<<8)          /* 64000Hz */
-#define SNDRV_PCM_RATE_88200           (1<<9)          /* 88200Hz */
-#define SNDRV_PCM_RATE_96000           (1<<10)         /* 96000Hz */
-#define SNDRV_PCM_RATE_176400          (1<<11)         /* 176400Hz */
-#define SNDRV_PCM_RATE_192000          (1<<12)         /* 192000Hz */
 
-/* utility functions */
-unsigned int compress_get_alsa_rate(unsigned int rate);
 #endif
diff --git a/utils.c b/utils.c
index a835bef25f78c1bafde63f0dd8542195a4620db4..9a0f86a3160a43d5039cbab81773c71014c9d699 100644 (file)
--- a/utils.c
+++ b/utils.c
 #define __user
 #include "tinycompress/tinycompress.h"
 
-
-unsigned int compress_get_alsa_rate(unsigned int rate)
-{
-       switch (rate) {
-       case 5512:
-               return SNDRV_PCM_RATE_5512;
-       case 8000:
-               return SNDRV_PCM_RATE_8000;
-       case 11025:
-               return SNDRV_PCM_RATE_11025;
-       case 16000:
-               return SNDRV_PCM_RATE_16000;
-       case 22050:
-               return SNDRV_PCM_RATE_22050;
-       case 32000:
-               return SNDRV_PCM_RATE_32000;
-       case 44100:
-               return SNDRV_PCM_RATE_44100;
-       case 48000:
-               return SNDRV_PCM_RATE_48000;
-       case 64000:
-               return SNDRV_PCM_RATE_64000;
-       case 88200:
-               return SNDRV_PCM_RATE_88200;
-       case 96000:
-               return SNDRV_PCM_RATE_96000;
-       case 176400:
-               return SNDRV_PCM_RATE_176400;
-       case 192000:
-               return SNDRV_PCM_RATE_192000;
-       default:
-               return 0;
-       }
-}