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

Commit bd395a99 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: Add TX app type support in compress driver"

parents eccc4d94 990749ca
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -73,6 +73,11 @@
/* bit 4 represents META enable of encoded data buffer */
#define BUFFER_META_ENABLE	0x0010

/* bit 5 represents timestamp */
/* bit 5 - 0 -- ASM_DATA_EVENT_READ_DONE will have relative time-stamp*/
/* bit 5 - 1 -- ASM_DATA_EVENT_READ_DONE will have absolute time-stamp*/
#define ABSOLUTE_TIMESTAMP_ENABLE  0x0020

/* Enable Sample_Rate/Channel_Mode notification event from Decoder */
#define SR_CM_NOTIFY_ENABLE	0x0004

@@ -156,6 +161,7 @@ struct audio_aio_read_param {
	phys_addr_t   paddr;
	uint32_t      len;
	uint32_t      uid;
	uint32_t      flags;/*meta data flags*/
};

struct audio_port_data {
@@ -246,6 +252,9 @@ int q6asm_open_read_v2(struct audio_client *ac, uint32_t format,
int q6asm_open_read_v3(struct audio_client *ac, uint32_t format,
		       uint16_t bits_per_sample);

int q6asm_open_read_v4(struct audio_client *ac, uint32_t format,
			uint16_t bits_per_sample);

int q6asm_open_write(struct audio_client *ac, uint32_t format
		/*, uint16_t bits_per_sample*/);

+14 −1
Original line number Diff line number Diff line
@@ -70,6 +70,11 @@
#define Q6_DTS		0x00010D88
#define Q6_DTS_LBR	0x00010DBB

/* Timestamp flsg */
/* Bit-0 - 1 : Enable Timestamp mode */
/* Bit-0 - 0 : Disable Timestamp mode */
#define COMPRESSED_TIMESTAMP_FLAG 0x0001

/* Codecs are listed linearly to allow for extensibility */
#define SND_AUDIOCODEC_PCM                   ((__u32) 0x00000001)
#define SND_AUDIOCODEC_MP3                   ((__u32) 0x00000002)
@@ -480,7 +485,15 @@ struct snd_codec {
	__u32 align;
	__u32 compr_passthr;
	union snd_codec_options options;
	__u32 reserved[3];
	__u32 flags;
	__u32 reserved[2];
} __attribute__((packed, aligned(4)));

struct snd_codec_metadata {
	__u32 length;
	__u32 offset;
	__u64 timestamp;
	__u32 reserved[4];
};

#endif
+62 −5
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = {
			.formats = (SNDRV_PCM_FMTBIT_S16_LE |
				    SNDRV_PCM_FMTBIT_S24_LE |
				    SNDRV_PCM_FMTBIT_S24_3LE),
			.channels_min = 1,
			.channels_min = 0,
			.channels_max = 8,
			.rate_min =     8000,
			.rate_max =     48000,
@@ -2459,6 +2459,63 @@ static struct snd_soc_dai_driver msm_fe_dais[] = {
		.name = "VoiceMMode2",
		.probe = fe_dai_probe,
	},
	{
		.capture = {
			.stream_name = "MultiMedia17 Capture",
			.aif_name = "MM_UL17",
			.rates = (SNDRV_PCM_RATE_8000_192000|
					SNDRV_PCM_RATE_KNOT),
			.formats = (SNDRV_PCM_FMTBIT_S16_LE |
				    SNDRV_PCM_FMTBIT_S24_LE |
				    SNDRV_PCM_FMTBIT_S24_3LE),
			.channels_min = 1,
			.channels_max = 8,
			.rate_min =     8000,
			.rate_max =     48000,
		},
		.ops = &msm_fe_Multimedia_dai_ops,
		.compress_dai = 1,
		.name = "MultiMedia17",
		.probe = fe_dai_probe,
	},
	{
		.capture = {
			.stream_name = "MultiMedia18 Capture",
			.aif_name = "MM_UL18",
			.rates = (SNDRV_PCM_RATE_8000_192000|
					SNDRV_PCM_RATE_KNOT),
			.formats = (SNDRV_PCM_FMTBIT_S16_LE |
				    SNDRV_PCM_FMTBIT_S24_LE |
				    SNDRV_PCM_FMTBIT_S24_3LE),
			.channels_min = 1,
			.channels_max = 8,
			.rate_min =     8000,
			.rate_max =     48000,
		},
		.ops = &msm_fe_Multimedia_dai_ops,
		.compress_dai = 1,
		.name = "MultiMedia18",
		.probe = fe_dai_probe,
	},
	{
		.capture = {
			.stream_name = "MultiMedia19 Capture",
			.aif_name = "MM_UL19",
			.rates = (SNDRV_PCM_RATE_8000_192000|
					SNDRV_PCM_RATE_KNOT),
			.formats = (SNDRV_PCM_FMTBIT_S16_LE |
				    SNDRV_PCM_FMTBIT_S24_LE |
				    SNDRV_PCM_FMTBIT_S24_3LE),
			.channels_min = 1,
			.channels_max = 8,
			.rate_min =     8000,
			.rate_max =     48000,
		},
		.ops = &msm_fe_Multimedia_dai_ops,
		.compress_dai = 1,
		.name = "MultiMedia19",
		.probe = fe_dai_probe,
	},
};

static int msm_fe_dai_dev_probe(struct platform_device *pdev)
+48 −0
Original line number Diff line number Diff line
@@ -1075,6 +1075,54 @@ static struct snd_soc_dai_link msm8952_common_fe_dai[] = {
		.codec_name = "snd-soc-dummy",
		.be_id = MSM_FRONTEND_DAI_VOICEMMODE2,
	},
	{/* hw:x,37 */
		.name = "MSM8X16 Compress10",
		.stream_name = "Compress10",
		.cpu_dai_name	= "MultiMedia17",
		.platform_name  = "msm-compress-dsp",
		.dynamic = 1,
		.dpcm_capture = 1,
		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
			 SND_SOC_DPCM_TRIGGER_POST},
		.codec_dai_name = "snd-soc-dummy-dai",
		.codec_name = "snd-soc-dummy",
		.ignore_suspend = 1,
		.ignore_pmdown_time = 1,
		 /* this dai link has playback support */
		.be_id = MSM_FRONTEND_DAI_MULTIMEDIA17,
	},
	{/* hw:x,38 */
		.name = "MSM8X16 Compress11",
		.stream_name = "Compress11",
		.cpu_dai_name	= "MultiMedia18",
		.platform_name  = "msm-compress-dsp",
		.dynamic = 1,
		.dpcm_capture = 1,
		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
			 SND_SOC_DPCM_TRIGGER_POST},
		.codec_dai_name = "snd-soc-dummy-dai",
		.codec_name = "snd-soc-dummy",
		.ignore_suspend = 1,
		.ignore_pmdown_time = 1,
		 /* this dai link has playback support */
		.be_id = MSM_FRONTEND_DAI_MULTIMEDIA18,
	},
	{/* hw:x,39 */
		.name = "MSM8X16 Compress12",
		.stream_name = "Compress12",
		.cpu_dai_name	= "MultiMedia19",
		.platform_name  = "msm-compress-dsp",
		.dynamic = 1,
		.dpcm_capture = 1,
		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
			 SND_SOC_DPCM_TRIGGER_POST},
		.codec_dai_name = "snd-soc-dummy-dai",
		.codec_name = "snd-soc-dummy",
		.ignore_suspend = 1,
		.ignore_pmdown_time = 1,
		 /* this dai link has playback support */
		.be_id = MSM_FRONTEND_DAI_MULTIMEDIA19,
	},
};

static struct snd_soc_dai_link msm8952_common_be_dai[] = {
Loading