All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Vinod Koul <vkoul@kernel.org>, Mark Brown <broonie@kernel.org>,
	Takashi Iwai <tiwai@suse.com>
Cc: linux-arm-msm@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Patrick Lai <plai@codeaurora.org>,
	Banajit Goswami <bgoswami@codeaurora.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH v2 8/9] ASoC: qcom: q6asm-dai: add support for ALAC and APE decoders
Date: Fri, 13 Mar 2020 12:15:59 +0000	[thread overview]
Message-ID: <fcee2779-fee8-e3d9-590f-e28fc5880ea0@linaro.org> (raw)
In-Reply-To: <20200313101627.1561365-9-vkoul@kernel.org>



On 13/03/2020 10:16, Vinod Koul wrote:
> Qualcomm DSPs also supports the ALAC and APE decoders, so add support
> for these and convert the snd_codec_params to qdsp format.
> 
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
One minor nit, other that,

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

> ---
>   sound/soc/qcom/qdsp6/q6asm-dai.c | 67 +++++++++++++++++++++++++++++++-
>   1 file changed, 66 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c
> index 53c250778eea..948710759824 100644
> --- a/sound/soc/qcom/qdsp6/q6asm-dai.c
> +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c
> @@ -628,12 +628,16 @@ static int q6asm_dai_compr_set_params(struct snd_compr_stream *stream,
>   	struct q6asm_dai_data *pdata;
>   	struct q6asm_flac_cfg flac_cfg;
>   	struct q6asm_wma_cfg wma_cfg;
> +	struct q6asm_alac_cfg alac_cfg;
> +	struct q6asm_ape_cfg ape_cfg;
>   	unsigned int wma_v9 = 0;
>   	struct device *dev = c->dev;
>   	int ret;
>   	union snd_codec_options *codec_options;
>   	struct snd_dec_flac *flac;
>   	struct snd_dec_wma *wma;
> +	struct snd_dec_alac *alac;
> +	struct snd_dec_ape *ape;
>   
>   	codec_options = &(prtd->codec_param.codec.options);
>   
> @@ -756,6 +760,65 @@ static int q6asm_dai_compr_set_params(struct snd_compr_stream *stream,
>   			dev_err(dev, "WMA9 CMD failed:%d\n", ret);
>   			return -EIO;
>   		}
> +		break;
> +
> +	case SND_AUDIOCODEC_ALAC:
> +		memset(&alac_cfg, 0x0, sizeof(alac_cfg));
> +		alac = &codec_options->alac_d;
> +
> +		alac_cfg.sample_rate = params->codec.sample_rate;
> +		alac_cfg.avg_bit_rate = params->codec.bit_rate;
> +		alac_cfg.bit_depth = prtd->bits_per_sample;
> +		alac_cfg.num_channels = params->codec.ch_in;
> +
> +		alac_cfg.frame_length = alac->frame_length;
> +		alac_cfg.pb = alac->pb;
> +		alac_cfg.mb = alac->mb;
> +		alac_cfg.kb = alac->kb;
> +		alac_cfg.max_run = alac->max_run;
> +		alac_cfg.compatible_version = alac->compatible_version;
> +		alac_cfg.max_frame_bytes = alac->max_frame_bytes;
> +
> +		switch (params->codec.ch_in) {
> +		case 1:
> +			alac_cfg.channel_layout_tag = (100 << 16) | 1;

We should probably define this layout tag in asm.h
something like:

#define ALAC_CHANNEL_LAYOUT_TAG_Mono (100<<16) | 1
#define ALAC_CHANNEL_LAYOUT_TAG_STEREO (100<<16) | 2

--srini

> +			break;
> +		case 2:
> +			alac_cfg.channel_layout_tag = (101 << 16) | 2;
> +			break;
> +		}

WARNING: multiple messages have this Message-ID (diff)
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Vinod Koul <vkoul@kernel.org>, Mark Brown <broonie@kernel.org>,
	Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org,
	Banajit Goswami <bgoswami@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, Patrick Lai <plai@codeaurora.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH v2 8/9] ASoC: qcom: q6asm-dai: add support for ALAC and APE decoders
Date: Fri, 13 Mar 2020 12:15:59 +0000	[thread overview]
Message-ID: <fcee2779-fee8-e3d9-590f-e28fc5880ea0@linaro.org> (raw)
In-Reply-To: <20200313101627.1561365-9-vkoul@kernel.org>



On 13/03/2020 10:16, Vinod Koul wrote:
> Qualcomm DSPs also supports the ALAC and APE decoders, so add support
> for these and convert the snd_codec_params to qdsp format.
> 
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
One minor nit, other that,

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

> ---
>   sound/soc/qcom/qdsp6/q6asm-dai.c | 67 +++++++++++++++++++++++++++++++-
>   1 file changed, 66 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c
> index 53c250778eea..948710759824 100644
> --- a/sound/soc/qcom/qdsp6/q6asm-dai.c
> +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c
> @@ -628,12 +628,16 @@ static int q6asm_dai_compr_set_params(struct snd_compr_stream *stream,
>   	struct q6asm_dai_data *pdata;
>   	struct q6asm_flac_cfg flac_cfg;
>   	struct q6asm_wma_cfg wma_cfg;
> +	struct q6asm_alac_cfg alac_cfg;
> +	struct q6asm_ape_cfg ape_cfg;
>   	unsigned int wma_v9 = 0;
>   	struct device *dev = c->dev;
>   	int ret;
>   	union snd_codec_options *codec_options;
>   	struct snd_dec_flac *flac;
>   	struct snd_dec_wma *wma;
> +	struct snd_dec_alac *alac;
> +	struct snd_dec_ape *ape;
>   
>   	codec_options = &(prtd->codec_param.codec.options);
>   
> @@ -756,6 +760,65 @@ static int q6asm_dai_compr_set_params(struct snd_compr_stream *stream,
>   			dev_err(dev, "WMA9 CMD failed:%d\n", ret);
>   			return -EIO;
>   		}
> +		break;
> +
> +	case SND_AUDIOCODEC_ALAC:
> +		memset(&alac_cfg, 0x0, sizeof(alac_cfg));
> +		alac = &codec_options->alac_d;
> +
> +		alac_cfg.sample_rate = params->codec.sample_rate;
> +		alac_cfg.avg_bit_rate = params->codec.bit_rate;
> +		alac_cfg.bit_depth = prtd->bits_per_sample;
> +		alac_cfg.num_channels = params->codec.ch_in;
> +
> +		alac_cfg.frame_length = alac->frame_length;
> +		alac_cfg.pb = alac->pb;
> +		alac_cfg.mb = alac->mb;
> +		alac_cfg.kb = alac->kb;
> +		alac_cfg.max_run = alac->max_run;
> +		alac_cfg.compatible_version = alac->compatible_version;
> +		alac_cfg.max_frame_bytes = alac->max_frame_bytes;
> +
> +		switch (params->codec.ch_in) {
> +		case 1:
> +			alac_cfg.channel_layout_tag = (100 << 16) | 1;

We should probably define this layout tag in asm.h
something like:

#define ALAC_CHANNEL_LAYOUT_TAG_Mono (100<<16) | 1
#define ALAC_CHANNEL_LAYOUT_TAG_STEREO (100<<16) | 2

--srini

> +			break;
> +		case 2:
> +			alac_cfg.channel_layout_tag = (101 << 16) | 2;
> +			break;
> +		}

  reply	other threads:[~2020-03-13 12:16 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 10:16 [RESEND PATCH v2 0/9] ALSA: compress: Add wma, alac and ape support Vinod Koul
2020-03-13 10:16 ` Vinod Koul
2020-03-13 10:16 ` [RESEND PATCH v2 1/9] ALSA: compress: add wma codec profiles Vinod Koul
2020-03-13 10:16   ` Vinod Koul
2020-03-13 10:16 ` [RESEND PATCH v2 2/9] ALSA: compress: Add wma decoder params Vinod Koul
2020-03-13 10:16   ` Vinod Koul
2020-03-13 10:16 ` [RESEND PATCH v2 3/9] ASoC: qcom: q6asm: pass codec profile to q6asm_open_write Vinod Koul
2020-03-13 10:16   ` Vinod Koul
2020-03-13 12:15   ` Srinivas Kandagatla
2020-03-13 12:15     ` Srinivas Kandagatla
2020-03-13 10:16 ` [RESEND PATCH v2 4/9] ASoC: qcom: q6asm: add support to wma config Vinod Koul
2020-03-13 10:16   ` Vinod Koul
2020-03-13 12:15   ` Srinivas Kandagatla
2020-03-13 12:15     ` Srinivas Kandagatla
2020-03-13 10:16 ` [RESEND PATCH v2 5/9] ASoC: qcom: q6asm-dai: add support to wma decoder Vinod Koul
2020-03-13 10:16   ` Vinod Koul
2020-03-13 12:15   ` Srinivas Kandagatla
2020-03-13 12:15     ` Srinivas Kandagatla
2020-03-13 10:16 ` [RESEND PATCH v2 6/9] ALSA: compress: add alac & ape decoder params Vinod Koul
2020-03-13 10:16   ` Vinod Koul
2020-03-13 10:16 ` [RESEND PATCH v2 7/9] ASoC: qcom: q6asm: add support for alac and ape configs Vinod Koul
2020-03-13 10:16   ` Vinod Koul
2020-03-13 12:15   ` Srinivas Kandagatla
2020-03-13 12:15     ` Srinivas Kandagatla
2020-03-13 10:16 ` [RESEND PATCH v2 8/9] ASoC: qcom: q6asm-dai: add support for ALAC and APE decoders Vinod Koul
2020-03-13 10:16   ` Vinod Koul
2020-03-13 12:15   ` Srinivas Kandagatla [this message]
2020-03-13 12:15     ` Srinivas Kandagatla
2020-03-13 12:40     ` Vinod Koul
2020-03-13 12:40       ` Vinod Koul
2020-03-13 10:16 ` [RESEND PATCH v2 9/9] ALSA: compress: bump the version Vinod Koul
2020-03-13 10:16   ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fcee2779-fee8-e3d9-590f-e28fc5880ea0@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=plai@codeaurora.org \
    --cc=tiwai@suse.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.