All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Serbinski <adam@serbinski.com>
To: Mark Brown <broonie@kernel.org>
Cc: Srini Kandagatla <srinivas.kandagatla@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Patrick Lai <plai@codeaurora.org>,
	Banajit Goswami <bgoswami@codeaurora.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 8/8] ASoC: qcom: apq8096: add kcontrols to set PCM rate
Date: Mon, 10 Feb 2020 16:13:52 -0500	[thread overview]
Message-ID: <7c57801d8f671c40d4c6094e5ce89681@serbinski.com> (raw)
In-Reply-To: <20200210200839.GG14166@sirena.org.uk>

On 2020-02-10 15:08, Mark Brown wrote:
> On Mon, Feb 10, 2020 at 03:00:55PM -0500, Adam Serbinski wrote:
>> On 2020-02-10 13:26, Mark Brown wrote:
> 
>> > To repeat my comment on another patch in the series there should still
>> > be some representation of the DAI for this device in the kernel.
> 
>> Respectfully, I'm not sure I understand what it is that you are 
>> suggesting.
> 
>> Is it your intention to suggest that instead of adding controls to the
>> machine driver, I should instead write a codec driver to contain those
>> controls?
> 
> I have already separately said that you should write a CODEC driver for
> this CODEC.  I'm saying that this seems like the sort of thing that
> might fit in that CODEC driver.

I see. My initial thought with respect to the codec driver would be just 
to use bt-sco.c, which is a dummy codec. I can certainly implement a new 
codec driver.

>> Or is it your intention to suggest that something within the kernel is
>> already aware of the rate to be set, and it is that which should set 
>> the
>> rate rather than a control?
> 
> That would be one example of how such a CODEC driver could be
> configured, and is how other baseband/BT devices have ended up going
> (see cx20442.c for example).

I am not aware of how this could be done for bluetooth, since the value 
still has to originate from userspace. The driver you referred to 
supports only a single sample rate, whereas for bluetooth, 2 sample 
rates are required, and nothing in the kernel is aware of the 
appropriate rate, at least in the case of the qca6174a I'm working with 
right now, or for that matter, TI Wilink 8, which I've also worked with.

My concern with implementing this in a new codec driver, is that this 
codec driver will be bound to qdsp6, since its purpose is to work around 
a characteristic of this DSP. Under simple-card, for instance, it would 
be redundant, since in that case, the parameters userspace uses to open 
the pcm will be propagated to the port. But under qdsp6, userspace could 
open the pcm at 44.1 kHz, yet the backend port is still set to 8 or 16 
kHz, and the DSP resamples between them, so the sole purpose of this 
change is to allow userspace to deliver the required sample rate to the 
back end of qdsp6.

WARNING: multiple messages have this Message-ID (diff)
From: Adam Serbinski <adam@serbinski.com>
To: Mark Brown <broonie@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	Banajit Goswami <bgoswami@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, Patrick Lai <plai@codeaurora.org>,
	Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Srini Kandagatla <srinivas.kandagatla@linaro.org>,
	Andy Gross <agross@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [alsa-devel] [PATCH v2 8/8] ASoC: qcom: apq8096: add kcontrols to set PCM rate
Date: Mon, 10 Feb 2020 16:13:52 -0500	[thread overview]
Message-ID: <7c57801d8f671c40d4c6094e5ce89681@serbinski.com> (raw)
In-Reply-To: <20200210200839.GG14166@sirena.org.uk>

On 2020-02-10 15:08, Mark Brown wrote:
> On Mon, Feb 10, 2020 at 03:00:55PM -0500, Adam Serbinski wrote:
>> On 2020-02-10 13:26, Mark Brown wrote:
> 
>> > To repeat my comment on another patch in the series there should still
>> > be some representation of the DAI for this device in the kernel.
> 
>> Respectfully, I'm not sure I understand what it is that you are 
>> suggesting.
> 
>> Is it your intention to suggest that instead of adding controls to the
>> machine driver, I should instead write a codec driver to contain those
>> controls?
> 
> I have already separately said that you should write a CODEC driver for
> this CODEC.  I'm saying that this seems like the sort of thing that
> might fit in that CODEC driver.

I see. My initial thought with respect to the codec driver would be just 
to use bt-sco.c, which is a dummy codec. I can certainly implement a new 
codec driver.

>> Or is it your intention to suggest that something within the kernel is
>> already aware of the rate to be set, and it is that which should set 
>> the
>> rate rather than a control?
> 
> That would be one example of how such a CODEC driver could be
> configured, and is how other baseband/BT devices have ended up going
> (see cx20442.c for example).

I am not aware of how this could be done for bluetooth, since the value 
still has to originate from userspace. The driver you referred to 
supports only a single sample rate, whereas for bluetooth, 2 sample 
rates are required, and nothing in the kernel is aware of the 
appropriate rate, at least in the case of the qca6174a I'm working with 
right now, or for that matter, TI Wilink 8, which I've also worked with.

My concern with implementing this in a new codec driver, is that this 
codec driver will be bound to qdsp6, since its purpose is to work around 
a characteristic of this DSP. Under simple-card, for instance, it would 
be redundant, since in that case, the parameters userspace uses to open 
the pcm will be propagated to the port. But under qdsp6, userspace could 
open the pcm at 44.1 kHz, yet the backend port is still set to 8 or 16 
kHz, and the DSP resamples between them, so the sole purpose of this 
change is to allow userspace to deliver the required sample rate to the 
back end of qdsp6.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2020-02-10 21:14 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 20:50 [PATCH 0/8] ASoC: qdsp6: db820c: Add support for external and bluetooth audio Adam Serbinski
2020-02-07 20:50 ` [alsa-devel] " Adam Serbinski
2020-02-07 20:50 ` [PATCH 1/8] ASoC: qdsp6: dt-bindings: Add q6afe pcm dt binding Adam Serbinski
2020-02-07 20:50   ` [alsa-devel] " Adam Serbinski
2020-02-07 20:50 ` [PATCH 2/8] ASoC: qdsp6: q6afe: add support to pcm ports Adam Serbinski
2020-02-07 20:50   ` [alsa-devel] " Adam Serbinski
2020-02-07 20:50 ` [PATCH 3/8] ASoC: qdsp6: q6afe-dai: add support to pcm port dais Adam Serbinski
2020-02-07 20:50   ` [alsa-devel] " Adam Serbinski
2020-02-07 20:50 ` [PATCH 4/8] ASoC: qdsp6: q6routing: add pcm port routing Adam Serbinski
2020-02-07 20:50   ` [alsa-devel] " Adam Serbinski
2020-02-07 20:50 ` [PATCH 5/8] ASoC: qcom: apq8096: add support for primary and quaternary I2S/PCM Adam Serbinski
2020-02-07 20:50   ` [alsa-devel] " Adam Serbinski
2020-02-07 20:50 ` [PATCH 6/8] ASoC: qcom/common: Use snd-soc-dummy-dai when codec is not specified Adam Serbinski
2020-02-07 20:50   ` [alsa-devel] " Adam Serbinski
2020-02-07 20:50 ` [PATCH 7/8] dts: msm8996/db820c: enable primary pcm and quaternary i2s Adam Serbinski
2020-02-07 20:50   ` [alsa-devel] " Adam Serbinski
2020-02-08 23:42   ` Bjorn Andersson
2020-02-08 23:42     ` [alsa-devel] " Bjorn Andersson
2020-02-07 20:50 ` [PATCH 8/8] ASoC: qcom: apq8096: add kcontrols to set PCM rate Adam Serbinski
2020-02-07 20:50   ` [alsa-devel] " Adam Serbinski
2020-02-09 15:47 ` [PATCH v2 0/8] ASoC: qdsp6: db820c: Add support for external and bluetooth audio Adam Serbinski
2020-02-09 15:47   ` [alsa-devel] " Adam Serbinski
2020-02-09 15:47   ` [PATCH v2 1/8] ASoC: qdsp6: dt-bindings: Add q6afe pcm dt binding Adam Serbinski
2020-02-09 15:47     ` [alsa-devel] " Adam Serbinski
2020-02-10 17:13     ` Srinivas Kandagatla
2020-02-10 17:13       ` [alsa-devel] " Srinivas Kandagatla
2020-02-09 15:47   ` [PATCH v2 2/8] ASoC: qdsp6: q6afe: add support to pcm ports Adam Serbinski
2020-02-09 15:47     ` [alsa-devel] " Adam Serbinski
2020-02-10 13:31     ` Mark Brown
2020-02-10 13:31       ` [alsa-devel] " Mark Brown
2020-02-10 14:50       ` Adam Serbinski
2020-02-10 14:50         ` [alsa-devel] " Adam Serbinski
2020-02-10 17:13     ` Srinivas Kandagatla
2020-02-10 17:13       ` [alsa-devel] " Srinivas Kandagatla
2020-02-09 15:47   ` [PATCH v2 3/8] ASoC: qdsp6: q6afe-dai: add support to pcm port dais Adam Serbinski
2020-02-09 15:47     ` [alsa-devel] " Adam Serbinski
2020-02-10 13:34     ` Mark Brown
2020-02-10 13:34       ` [alsa-devel] " Mark Brown
2020-02-10 17:13     ` Srinivas Kandagatla
2020-02-10 17:13       ` [alsa-devel] " Srinivas Kandagatla
2020-02-10 17:22       ` Adam Serbinski
2020-02-10 17:22         ` [alsa-devel] " Adam Serbinski
2020-02-10 17:40         ` Srinivas Kandagatla
2020-02-10 17:40           ` [alsa-devel] " Srinivas Kandagatla
2020-02-09 15:47   ` [PATCH v2 4/8] ASoC: qdsp6: q6routing: add pcm port routing Adam Serbinski
2020-02-09 15:47     ` [alsa-devel] " Adam Serbinski
2020-02-10 17:19     ` Srinivas Kandagatla
2020-02-10 17:19       ` [alsa-devel] " Srinivas Kandagatla
2020-02-09 15:47   ` [PATCH v2 5/8] ASoC: qcom: apq8096: add support for primary and quaternary I2S/PCM Adam Serbinski
2020-02-09 15:47     ` [alsa-devel] " Adam Serbinski
2020-02-09 15:47   ` [PATCH v2 6/8] ASoC: qcom/common: Use snd-soc-dummy-dai when codec is not specified Adam Serbinski
2020-02-09 15:47     ` [alsa-devel] " Adam Serbinski
2020-02-10 13:35     ` Mark Brown
2020-02-10 13:35       ` [alsa-devel] " Mark Brown
2020-02-09 15:47   ` [PATCH v2 7/8] arm64: dts: qcom: db820c: Enable primary PCM and quaternary I2S Adam Serbinski
2020-02-09 15:47     ` [alsa-devel] " Adam Serbinski
2020-02-09 15:47   ` [PATCH v2 8/8] ASoC: qcom: apq8096: add kcontrols to set PCM rate Adam Serbinski
2020-02-09 15:47     ` [alsa-devel] " Adam Serbinski
2020-02-10 13:36     ` Mark Brown
2020-02-10 13:36       ` [alsa-devel] " Mark Brown
2020-02-10 15:45       ` Adam Serbinski
2020-02-10 15:45         ` [alsa-devel] " Adam Serbinski
2020-02-10 18:26         ` Mark Brown
2020-02-10 18:26           ` [alsa-devel] " Mark Brown
2020-02-10 20:00           ` Adam Serbinski
2020-02-10 20:00             ` [alsa-devel] " Adam Serbinski
2020-02-10 20:08             ` Mark Brown
2020-02-10 20:08               ` [alsa-devel] " Mark Brown
2020-02-10 21:13               ` Adam Serbinski [this message]
2020-02-10 21:13                 ` Adam Serbinski
2020-02-11 11:42                 ` Mark Brown
2020-02-11 11:42                   ` [alsa-devel] " Mark Brown
2020-02-11 13:52                   ` Adam Serbinski
2020-02-11 13:52                     ` [alsa-devel] " Adam Serbinski
2020-02-10 16:18     ` Jaroslav Kysela
2020-02-10 16:18       ` [alsa-devel] " Jaroslav Kysela
2020-02-10 17:13       ` Adam Serbinski
2020-02-10 17:13         ` [alsa-devel] " Adam Serbinski
2020-02-10 12:17   ` [PATCH v2 0/8] ASoC: qdsp6: db820c: Add support for external and bluetooth audio Mark Brown
2020-02-10 12:17     ` [alsa-devel] " Mark Brown
2020-02-10 13:44     ` Adam Serbinski
2020-02-10 13:44       ` [alsa-devel] " Adam Serbinski

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=7c57801d8f671c40d4c6094e5ce89681@serbinski.com \
    --to=adam@serbinski.com \
    --cc=agross@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=perex@perex.cz \
    --cc=plai@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.com \
    /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.