blob: 10e46faca7838b691bada1b6256e4923362c13b4 [file] [log] [blame]
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __EXYNOS_AUDIOPROXY_ABOX_H__
#define __EXYNOS_AUDIOPROXY_ABOX_H__
#include <linux/ioctl.h>
#include <linux/types.h>
/* A-Box HW limitations */
// Supported Sampling Rate
#define MAX_NUM_PLAYBACK_SR 8
unsigned int supported_playback_samplingrate[MAX_NUM_PLAYBACK_SR] = {8000, 16000, 32000, 44100, 48000, 96000, 192000, 384000};
/* In spite of A-Box spec, we need to fix 48KHz recording only to support some solution limitation */
#define MAX_NUM_CAPTURE_SR 1
unsigned int supported_capture_samplingrate[MAX_NUM_CAPTURE_SR] = {48000};
// Supported Channel Mask
#define MAX_NUM_PLAYBACK_CM 2
audio_channel_mask_t supported_playback_channelmask[MAX_NUM_PLAYBACK_CM] = {AUDIO_CHANNEL_OUT_MONO, AUDIO_CHANNEL_OUT_STEREO};
// Supported direct Channel Mask
#define MAX_NUM_DIRECT_PLAYBACK_CM 3
audio_channel_mask_t supported_direct_playback_channelmask[MAX_NUM_DIRECT_PLAYBACK_CM] = {AUDIO_CHANNEL_OUT_5POINT1, AUDIO_CHANNEL_OUT_6POINT1, AUDIO_CHANNEL_OUT_7POINT1};
#define MAX_NUM_CAPTURE_CM 2
audio_channel_mask_t supported_capture_channelmask[MAX_NUM_CAPTURE_CM] = {AUDIO_CHANNEL_IN_STEREO, AUDIO_CHANNEL_IN_FRONT_BACK};
// Supported PCM Format
#define MAX_NUM_PLAYBACK_PF 3
audio_format_t supported_playback_pcmformat[MAX_NUM_PLAYBACK_PF] = {AUDIO_FORMAT_PCM_16_BIT, AUDIO_FORMAT_PCM_8_24_BIT, AUDIO_FORMAT_PCM_32_BIT};
#define MAX_NUM_CAPTURE_PF 2
audio_format_t supported_capture_pcmformat[MAX_NUM_CAPTURE_PF] = {AUDIO_FORMAT_PCM_16_BIT, AUDIO_FORMAT_PCM_8_24_BIT};
// Supported Audio Format
#define MAX_NUM_PLAYBACK_AF 1
audio_format_t supported_playback_audioformat[MAX_NUM_PLAYBACK_AF] = {AUDIO_FORMAT_MP3};
/* Calliope Firmware Dump */
#define CALLIOPE_LOG_BUFFERSIZE (4 * 1024)
#define CALLIOPE_DBG_PATH "/sys/kernel/debug/abox/"
#define CALLIOPE_LOG "log-00"
#define SYSFS_PREFIX "/sys"
#define ABOX_DEV "/devices/platform/14a50000.abox/"
#define ABOX_REGMAP_PATH "/d/regmap/14a50000.abox/"
#define ABOX_DEBUG "0.abox-debug/"
#define ABOX_SRAM "calliope_sram"
#define ABOX_DRAM "calliope_dram"
#define ABOX_REG_FILE "registers"
#define ABOX_DUMP "/data/vendor/log/abox/"
#define ABOX_DUMP_LIMIT (10)
#define ABOX_GPR "gpr"
// ION Memory MMAP FD retreiving interface
struct snd_pcm_mmap_fd {
int32_t dir;
int32_t fd;
int32_t size;
int32_t actual_size;
};
#define SNDRV_PCM_IOCTL_MMAP_DATA_FD _IOWR('U', 0xd2, struct snd_pcm_mmap_fd)
#endif // __EXYNOS_AUDIOPROXY_ABOX_H__