blob: 549753acaff11f3cb3e1d288f919d5869bdec9d7 [file] [log] [blame]
/*
* Copyright (C) 2017 Amlogic Corporation.
*
* 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.
*/
#define LOG_TAG "audio_hw_input_dtv"
#include <system/audio.h>
#include "device_patch.h"
#include "audio_hw_utils.h"
#if 0
void create_tvin_buffer(struct aml_audio_patch *patch)
{
int ret;
if (patch->is_dtv_src) {
/* dtv case: buffer len = 32 * 4 ms */
ret = ring_buffer_init(&patch->tvin_ringbuffer, (32 * 4) * (48 * 4));
} else {
ret = ring_buffer_init(&patch->tvin_ringbuffer, 4 * 48 * 64);
}
ALOGI("[%s] aring_buffer_init ret=%d\n", __FUNCTION__, ret);
if (ret == 0) {
patch->tvin_buffer_inited = 1;
}
}
void release_tvin_buffer(struct aml_audio_patch *patch)
{
if (patch->tvin_buffer_inited == 1) {
patch->tvin_buffer_inited = 0;
ring_buffer_release(&(patch->tvin_ringbuffer));
}
}
#endif
/*
Function:dump all audio patch's information
Details:
1) android audio patch list register in audio hal
2) amlogic device patches created dynamicly by audio hal
*/
void adev_audio_patches_dump(struct aml_audio_device* aml_dev, int fd)
{
audio_patch_list_dump(aml_dev, fd);
}