Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame^] | 1 | /* Copyright (c) 2010, Code Aurora Forum. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | #ifndef __MSM_AUDIO_SBC_H |
| 15 | #define __MSM_AUDIO_SBC_H |
| 16 | |
| 17 | #include <linux/msm_audio.h> |
| 18 | |
| 19 | #define AUDIO_SET_SBC_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ |
| 20 | (AUDIO_MAX_COMMON_IOCTL_NUM+0), struct msm_audio_sbc_enc_config) |
| 21 | |
| 22 | #define AUDIO_GET_SBC_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ |
| 23 | (AUDIO_MAX_COMMON_IOCTL_NUM+1), struct msm_audio_sbc_enc_config) |
| 24 | |
| 25 | #define AUDIO_SBC_BA_LOUDNESS 0x0 |
| 26 | #define AUDIO_SBC_BA_SNR 0x1 |
| 27 | |
| 28 | #define AUDIO_SBC_MODE_MONO 0x0 |
| 29 | #define AUDIO_SBC_MODE_DUAL 0x1 |
| 30 | #define AUDIO_SBC_MODE_STEREO 0x2 |
| 31 | #define AUDIO_SBC_MODE_JSTEREO 0x3 |
| 32 | |
| 33 | #define AUDIO_SBC_BANDS_8 0x1 |
| 34 | |
| 35 | #define AUDIO_SBC_BLOCKS_4 0x0 |
| 36 | #define AUDIO_SBC_BLOCKS_8 0x1 |
| 37 | #define AUDIO_SBC_BLOCKS_12 0x2 |
| 38 | #define AUDIO_SBC_BLOCKS_16 0x3 |
| 39 | |
| 40 | struct msm_audio_sbc_enc_config { |
| 41 | uint32_t channels; |
| 42 | uint32_t sample_rate; |
| 43 | uint32_t bit_allocation; |
| 44 | uint32_t number_of_subbands; |
| 45 | uint32_t number_of_blocks; |
| 46 | uint32_t bit_rate; |
| 47 | uint32_t mode; |
| 48 | }; |
| 49 | #endif /* __MSM_AUDIO_SBC_H */ |