/* * Copyright (c) Hisilicon Technologies Co., Ltd. 2020-2020. All rights reserved. * Description: audio hal primary input header file. * Author: Hisilicon * Create: 2020-05-11 * Notes: NA * History: 2020-05-11 yinyingcai for CodingStyle */ #ifndef HPI_H #define HPI_H #include #include #include #include "audio_hw.h" #define AI_CARD_ID 0 #define AI_DEVICE_ID 0 #define AI_DEVICE_ID1 1 struct hpi_data { int in_card; int in_device; size_t frames_read; struct pcm *pcm; struct stream_in *in; FILE *fd; }; int hpi_open(struct hpi_data *hpi); int hpi_create(struct hpi_data **pphpi); void hpi_destroy(struct hpi_data *hpi); int hpi_close(struct hpi_data *hpi); ssize_t hpi_read(struct hpi_data *hpi, const uint8_t* buffer, size_t bytes); #endif