-
Notifications
You must be signed in to change notification settings - Fork 12
audioreach-driver: Remove header dependencies and fix compilation warnings #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 */ | ||
| // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. | ||
|
|
||
| #ifndef __Q6APM_AUDIO_H__ | ||
| #define __Q6APM_AUDIO_H__ | ||
|
|
||
| #include <sound/soc.h> | ||
|
|
||
| #define AR_PCM_MAX_NUM_CHANNEL 8 | ||
|
|
||
| struct audioreach_module_config { | ||
| int direction; | ||
| u32 sample_rate; | ||
| u16 bit_width; | ||
| u16 bits_per_sample; | ||
|
|
||
| u16 data_format; | ||
| u16 num_channels; | ||
| u16 dp_idx; | ||
| u32 channel_allocation; | ||
| u32 sd_line_mask; | ||
| int fmt; | ||
| struct snd_codec codec; | ||
| u8 channel_map[AR_PCM_MAX_NUM_CHANNEL]; | ||
| }; | ||
|
|
||
| struct q6dsp_audio_port_dai_driver_config { | ||
| int (*probe)(struct snd_soc_dai *dai); | ||
| int (*remove)(struct snd_soc_dai *dai); | ||
| const struct snd_soc_dai_ops *q6hdmi_ops; | ||
| const struct snd_soc_dai_ops *q6slim_ops; | ||
| const struct snd_soc_dai_ops *q6i2s_ops; | ||
| const struct snd_soc_dai_ops *q6tdm_ops; | ||
| const struct snd_soc_dai_ops *q6dma_ops; | ||
| const struct snd_soc_dai_ops *q6usb_ops; | ||
| }; | ||
|
|
||
| struct apm_cmd_header { | ||
| uint32_t payload_address_lsw; | ||
| uint32_t payload_address_msw; | ||
| uint32_t mem_map_handle; | ||
| uint32_t payload_size; | ||
| } __packed; | ||
|
|
||
| #define APM_CMD_HDR_SIZE sizeof(struct apm_cmd_header) | ||
|
|
||
| struct apm_module_param_data { | ||
| uint32_t module_instance_id; | ||
| uint32_t param_id; | ||
| uint32_t param_size; | ||
| uint32_t error_code; | ||
| } __packed; | ||
|
|
||
| #define APM_MODULE_PARAM_DATA_SIZE sizeof(struct apm_module_param_data) | ||
|
|
||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,10 +26,14 @@ | |
| #include <sound/soc.h> | ||
| #include <sound/soc-dapm.h> | ||
| #include <sound/pcm.h> | ||
| #include "audioreach.h" | ||
| #include "q6apm.h" | ||
| #include "q6apm_audio.h" | ||
| #include "q6prm_audioreach.h" | ||
|
|
||
| #define APM_MODULE_INSTANCE_ID 0x00000001 | ||
| #define APM_CMD_CLOSE_ALL 0x01001013 | ||
| #define APM_CMD_GET_SPF_STATE 0x01001021 | ||
| #define APM_CMD_RSP_GET_SPF_STATE 0x02001007 | ||
| #define APM_CMD_CLOSE_ALL 0x01001013 | ||
| #define APM_CMD_SHARED_MEM_MAP_REGIONS 0x0100100C | ||
| #define APM_MEMORY_MAP_BIT_MASK_IS_OFFSET_MODE 0x00000004UL | ||
|
|
||
|
|
@@ -642,21 +646,20 @@ static int q6apm_audio_pkt_callback(struct gpr_resp_pkt *data, void *priv, int o | |
| struct q6apm_audio_pkt *apm = dev_get_drvdata(&gdev->dev); | ||
| struct gpr_ibasic_rsp_result_t *result; | ||
| struct gpr_hdr *hdr = &data->hdr; | ||
| struct device *dev = &gdev->dev; | ||
| uint8_t *pkt = NULL; | ||
| uint16_t hdr_size, pkt_size; | ||
| unsigned long flags; | ||
| struct sk_buff *skb; | ||
| struct port_backup backup; | ||
| int ret; | ||
|
|
||
|
|
||
| hdr_size = hdr->hdr_size * 4; | ||
| pkt_size = hdr->pkt_size; | ||
|
|
||
| hdr_size = hdr->hdr_size * 4; | ||
| pkt_size = hdr->pkt_size; | ||
|
|
||
| ret = fifo_pop(&backup); | ||
| if (ret < 0) | ||
| AUDIO_PKT_ERR("Failed to pop backup ports from FIFO\n"); | ||
| dev_dbg(dev, "Failed to pop backup ports from FIFO\n"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there AUDIO_PKT_DBG macro? Is AUDIO_PKT_ERR defined to allow log level change at run-time?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AUDIO_PKT_DBG macro not available and there is no log level AUDIO_PKT_ERR. |
||
|
|
||
| hdr->dest_port = backup.src_port; | ||
| hdr->src_port = backup.dest_port; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not getting the context of this change. How is it related to debian compilation? I thought we are just duplicating definitions from header files which are not residing in /inc
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in existing machine driver in upstream, the startup snd-ops function defined in sound/soc/qcom/sdw.c and not in machine driver, the function declarations done in sound/soc/qcom/sdw.c not in Include.
As part of independed machine driver compilation startup defined in machine driver since it's driver specific snd ops.