Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6be40e2c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm: qdsp6v2: pull mode playback and push mode record"

parents 51f9e23d c0a7f341
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -34,6 +34,22 @@ Required properties:
                            regular : regular low latency stream
                            ultra : ultra low latency stream
                            ull-pp : ultra low latency stream with post-processing capability

* msm-pcm-dsp-noirq

Required properties:

 - compatible : "qcom,msm-pcm-dsp-noirq";

   Optional properties

      - qcom,msm-pcm-low-latency : Flag indicating whether
        the device node is of type low latency

      - qcom,latency-level : Flag indicating whether the device node
                           is of type low latency or ultra low latency
                           ultra : ultra low latency stream
                           ull-pp : ultra low latency stream with post-processing capability
* msm-pcm-routing

Required properties:
+108 −0
Original line number Diff line number Diff line
@@ -3237,6 +3237,8 @@ struct asm_softvolume_params {

#define ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V2 0x00010DA5

#define ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V3 0x00010DDC

#define ASM_MEDIA_FMT_EVRCB_FS 0x00010BEF

#define ASM_MEDIA_FMT_EVRCWB_FS 0x00010BF0
@@ -3304,6 +3306,41 @@ struct asm_multi_channel_pcm_fmt_blk_v2 {
 */
} __packed;

struct asm_multi_channel_pcm_fmt_blk_v3 {
	uint16_t                num_channels;
/*
 * Number of channels
 * Supported values: 1 to 8
 */

	uint16_t                bits_per_sample;
/*
 * Number of bits per sample per channel
 * Supported values: 16, 24
 */

	uint32_t                sample_rate;
/*
 * Number of samples per second
 * Supported values: 2000 to 48000, 96000,192000 Hz
 */

	uint16_t                is_signed;
/* Flag that indicates that PCM samples are signed (1) */

	uint16_t                sample_word_size;
/*
 * Size in bits of the word that holds a sample of a channel.
 * Supported values: 12,24,32
 */

	uint8_t                 channel_mapping[8];
/*
 * Each element, i, in the array describes channel i inside the buffer where
 * 0 <= i < num_channels. Unused channels are set to 0.
 */
} __packed;

struct asm_stream_cmd_set_encdec_param {
	u32                  param_id;
	/* ID of the parameter. */
@@ -4774,6 +4811,77 @@ struct asm_stream_cmd_open_write_v3 {
 */
} __packed;

#define ASM_STREAM_CMD_OPEN_PULL_MODE_WRITE    0x00010DD9

/* Bitmask for the stream_perf_mode subfield. */
#define ASM_BIT_MASK_STREAM_PERF_FLAG_PULL_MODE_WRITE 0xE0000000UL

/* Bitmask for the stream_perf_mode subfield. */
#define ASM_SHIFT_STREAM_PERF_FLAG_PULL_MODE_WRITE 29

#define ASM_STREAM_CMD_OPEN_PUSH_MODE_READ  0x00010DDA

#define ASM_BIT_MASK_STREAM_PERF_FLAG_PUSH_MODE_READ 0xE0000000UL

#define ASM_SHIFT_STREAM_PERF_FLAG_PUSH_MODE_READ 29

#define ASM_DATA_EVENT_WATERMARK 0x00010DDB

struct asm_shared_position_buffer {
	volatile uint32_t               frame_counter;
/* Counter used to handle interprocessor synchronization issues.
 * When frame_counter is 0: read_index, wall_clock_us_lsw, and
 * wall_clock_us_msw are invalid.
 * Supported values: >= 0.
 */

	volatile uint32_t               index;
/* Index in bytes from where the aDSP is reading/writing.
 * Supported values: 0 to circular buffer size - 1
 */

	volatile uint32_t               wall_clock_us_lsw;
/* Lower 32 bits of the 64-bit wall clock time in microseconds when the
 * read index was updated.
 * Supported values: >= 0
 */

	volatile uint32_t               wall_clock_us_msw;
/* Upper 32 bits of the 64 bit wall clock time in microseconds when the
 * read index was updated
 * Supported values: >= 0
 */
} __packed;

struct asm_shared_watermark_level {
	uint32_t                watermark_level_bytes;
} __packed;

struct asm_stream_cmd_open_shared_io {
	struct apr_hdr          hdr;
	uint32_t                mode_flags;
	uint16_t                endpoint_type;
	uint16_t                topo_bits_per_sample;
	uint32_t                topo_id;
	uint32_t                fmt_id;
	uint32_t                shared_pos_buf_phy_addr_lsw;
	uint32_t                shared_pos_buf_phy_addr_msw;
	uint16_t                shared_pos_buf_mem_pool_id;
	uint16_t                shared_pos_buf_num_regions;
	uint32_t                shared_pos_buf_property_flag;
	uint32_t                shared_circ_buf_start_phy_addr_lsw;
	uint32_t                shared_circ_buf_start_phy_addr_msw;
	uint32_t                shared_circ_buf_size;
	uint16_t                shared_circ_buf_mem_pool_id;
	uint16_t                shared_circ_buf_num_regions;
	uint32_t                shared_circ_buf_property_flag;
	uint32_t                num_watermark_levels;
	struct asm_multi_channel_pcm_fmt_blk_v3         fmt;
	struct avs_shared_map_region_payload            map_region_pos_buf;
	struct avs_shared_map_region_payload            map_region_circ_buf;
	struct asm_shared_watermark_level watermark[0];
} __packed;

#define ASM_STREAM_CMD_OPEN_READ_V3                 0x00010DB4

/* Definition of the timestamp type flag bitmask */
+23 −0
Original line number Diff line number Diff line
@@ -167,6 +167,16 @@ struct audio_port_data {
	spinlock_t	    dsp_lock;
};

struct shared_io_config {
	uint32_t format;
	uint16_t bits_per_sample;
	uint32_t rate;
	uint32_t channels;
	uint16_t sample_word_size;
	uint32_t bufsz;
	uint32_t bufcnt;
};

struct audio_client {
	int                    session;
	app_cb		       cb;
@@ -200,6 +210,9 @@ struct audio_client {
	atomic_t               reset;
	/* holds latest DSP pipeline delay */
	uint32_t               path_delay;
	/* shared io */
	struct audio_buffer shared_pos_buf;
	struct shared_io_config config;
};

void q6asm_audio_client_free(struct audio_client *ac);
@@ -233,6 +246,9 @@ int q6asm_open_write(struct audio_client *ac, uint32_t format
int q6asm_open_write_v2(struct audio_client *ac, uint32_t format,
			uint16_t bits_per_sample);

int q6asm_open_shared_io(struct audio_client *ac,
			 struct shared_io_config *c, int dir);

int q6asm_stream_open_write_v2(struct audio_client *ac, uint32_t format,
				uint16_t bits_per_sample, int32_t stream_id,
				bool is_gapless_mode);
@@ -273,6 +289,13 @@ int q6asm_memory_map(struct audio_client *ac, phys_addr_t buf_add,
int q6asm_memory_unmap(struct audio_client *ac, phys_addr_t buf_add,
							int dir);

struct audio_buffer *q6asm_shared_io_buf(struct audio_client *ac, int dir);

int q6asm_shared_io_free(struct audio_client *ac, int dir);

int q6asm_get_shared_pos(struct audio_client *ac, uint32_t *si, uint32_t *msw,
			 uint32_t *lsw);

int q6asm_map_rtac_block(struct rtac_cal_block_data *cal_block);

int q6asm_unmap_rtac_block(uint32_t *mem_map_handle);
+1 −1
Original line number Diff line number Diff line
@@ -16,6 +16,6 @@ obj-$(CONFIG_DOLBY_DS2) += msm-ds2-dap-config.o
obj-$(CONFIG_DTS_SRS_TM) += msm-dts-srs-tm-config.o
obj-$(CONFIG_QTI_PP) += msm-qti-pp-config.o
obj-y += audio_calibration.o audio_cal_utils.o q6adm.o q6afe.o q6asm.o \
	q6audio-v2.o q6voice.o q6core.o rtac.o q6lsm.o
	q6audio-v2.o q6voice.o q6core.o rtac.o q6lsm.o msm-pcm-q6-noirq.o
ocmem-audio-objs += audio_ocmem.o
obj-$(CONFIG_AUDIO_OCMEM) += ocmem-audio.o
+809 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading