From: Lars-Peter Clausen <lars@metafoo.de>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: alsa-devel@alsa-project.org,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Mark Brown <broonie@kernel.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [alsa-devel] [PATCH v3 4/5] ASoC: tda998x: adjust the audio hw parameters from EDID
Date: Wed, 05 Feb 2014 19:21:23 +0100 [thread overview]
Message-ID: <52F28123.1080102@metafoo.de> (raw)
In-Reply-To: <20140205190732.5617f200@armhf>
On 02/05/2014 07:07 PM, Jean-Francois Moine wrote:
> On Wed, 05 Feb 2014 10:19:22 +0100
> Lars-Peter Clausen <lars@metafoo.de> wrote:
>
>>> So, in the CODEC, I don't see how I could update the parameters
>>> dictated by the EDID otherwise in changing the DAI driver parameters.
>>>
>>
>> The startup function is the right place. But instead of modifying the DAI
>> use snd_pcm_hw_constraint_mask64(), snd_pcm_hw_constraint_list(), etc. to
>> setup the additional constraints that come from the EDID.
>
> It is more complicated, but it works. Nevertheless, I have 2 problems:
>
> - snd_pcm_hw_constraint_list() keeps a pointer to the list, so, it
> cannot be in the stack. It fix this with static struct and rate array.
>
Right. If the struct is modified though it should be per device and not
global. I think the best way to implement this is to make the array static
and specify a mask for the constraint based on the EDID. E.g.
static unsigned int hdmi_rates[] = {
32000,
44100,
48000,
88200,
96000,
176400,
192000,
};
rate_mask = 0;
while (...) {
...
rate_mask |= 1 << sad[1];
}
rate_constraints->list = hdmi_rates;
rate_constraints->count = ARRAY_SIZE(hdmi_rates);
rate_constraints->mask = rate_mask;
> - snd_pcm_hw_constraint_mask64() is not exported.
> Is there an other way to set constraints on the formats/sample widths?
I think that's a bug. Both snd_pcm_hw_constraint_mask() and
snd_pcm_hw_constraint_mask64() should be exported. Can you send a patch?
- Lars
WARNING: multiple messages have this Message-ID (diff)
From: lars@metafoo.de (Lars-Peter Clausen)
To: linux-arm-kernel@lists.infradead.org
Subject: [alsa-devel] [PATCH v3 4/5] ASoC: tda998x: adjust the audio hw parameters from EDID
Date: Wed, 05 Feb 2014 19:21:23 +0100 [thread overview]
Message-ID: <52F28123.1080102@metafoo.de> (raw)
In-Reply-To: <20140205190732.5617f200@armhf>
On 02/05/2014 07:07 PM, Jean-Francois Moine wrote:
> On Wed, 05 Feb 2014 10:19:22 +0100
> Lars-Peter Clausen <lars@metafoo.de> wrote:
>
>>> So, in the CODEC, I don't see how I could update the parameters
>>> dictated by the EDID otherwise in changing the DAI driver parameters.
>>>
>>
>> The startup function is the right place. But instead of modifying the DAI
>> use snd_pcm_hw_constraint_mask64(), snd_pcm_hw_constraint_list(), etc. to
>> setup the additional constraints that come from the EDID.
>
> It is more complicated, but it works. Nevertheless, I have 2 problems:
>
> - snd_pcm_hw_constraint_list() keeps a pointer to the list, so, it
> cannot be in the stack. It fix this with static struct and rate array.
>
Right. If the struct is modified though it should be per device and not
global. I think the best way to implement this is to make the array static
and specify a mask for the constraint based on the EDID. E.g.
static unsigned int hdmi_rates[] = {
32000,
44100,
48000,
88200,
96000,
176400,
192000,
};
rate_mask = 0;
while (...) {
...
rate_mask |= 1 << sad[1];
}
rate_constraints->list = hdmi_rates;
rate_constraints->count = ARRAY_SIZE(hdmi_rates);
rate_constraints->mask = rate_mask;
> - snd_pcm_hw_constraint_mask64() is not exported.
> Is there an other way to set constraints on the formats/sample widths?
I think that's a bug. Both snd_pcm_hw_constraint_mask() and
snd_pcm_hw_constraint_mask64() should be exported. Can you send a patch?
- Lars
WARNING: multiple messages have this Message-ID (diff)
From: Lars-Peter Clausen <lars@metafoo.de>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: Mark Brown <broonie@kernel.org>,
alsa-devel@alsa-project.org,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Rob Clark <robdclark@gmail.com>, Dave Airlie <airlied@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [alsa-devel] [PATCH v3 4/5] ASoC: tda998x: adjust the audio hw parameters from EDID
Date: Wed, 05 Feb 2014 19:21:23 +0100 [thread overview]
Message-ID: <52F28123.1080102@metafoo.de> (raw)
In-Reply-To: <20140205190732.5617f200@armhf>
On 02/05/2014 07:07 PM, Jean-Francois Moine wrote:
> On Wed, 05 Feb 2014 10:19:22 +0100
> Lars-Peter Clausen <lars@metafoo.de> wrote:
>
>>> So, in the CODEC, I don't see how I could update the parameters
>>> dictated by the EDID otherwise in changing the DAI driver parameters.
>>>
>>
>> The startup function is the right place. But instead of modifying the DAI
>> use snd_pcm_hw_constraint_mask64(), snd_pcm_hw_constraint_list(), etc. to
>> setup the additional constraints that come from the EDID.
>
> It is more complicated, but it works. Nevertheless, I have 2 problems:
>
> - snd_pcm_hw_constraint_list() keeps a pointer to the list, so, it
> cannot be in the stack. It fix this with static struct and rate array.
>
Right. If the struct is modified though it should be per device and not
global. I think the best way to implement this is to make the array static
and specify a mask for the constraint based on the EDID. E.g.
static unsigned int hdmi_rates[] = {
32000,
44100,
48000,
88200,
96000,
176400,
192000,
};
rate_mask = 0;
while (...) {
...
rate_mask |= 1 << sad[1];
}
rate_constraints->list = hdmi_rates;
rate_constraints->count = ARRAY_SIZE(hdmi_rates);
rate_constraints->mask = rate_mask;
> - snd_pcm_hw_constraint_mask64() is not exported.
> Is there an other way to set constraints on the formats/sample widths?
I think that's a bug. Both snd_pcm_hw_constraint_mask() and
snd_pcm_hw_constraint_mask64() should be exported. Can you send a patch?
- Lars
next prev parent reply other threads:[~2014-02-05 18:21 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-01 17:10 [PATCH v3 0/5] add a TDA998x CODEC Jean-Francois Moine
2014-02-01 17:10 ` Jean-Francois Moine
2014-02-01 17:10 ` Jean-Francois Moine
2014-01-26 18:02 ` [PATCH v3 1/5] drm/i2c: tda998x: add a function for dynamic audio input switch Jean-Francois Moine
2014-01-26 18:02 ` Jean-Francois Moine
2014-01-26 18:02 ` Jean-Francois Moine
2014-01-26 18:45 ` [PATCH v3 2/5] ASoC: tda998x: add a codec driver for the TDA998x Jean-Francois Moine
2014-01-26 18:45 ` Jean-Francois Moine
2014-01-26 18:45 ` Jean-Francois Moine
2014-02-04 13:30 ` Mark Brown
2014-02-04 13:30 ` Mark Brown
2014-02-04 13:36 ` [alsa-devel] " Lars-Peter Clausen
2014-02-04 13:36 ` Lars-Peter Clausen
2014-02-04 17:46 ` Mark Brown
2014-02-04 17:46 ` Mark Brown
2014-02-04 17:16 ` Jean-Francois Moine
2014-02-04 17:16 ` Jean-Francois Moine
2014-02-04 17:16 ` Jean-Francois Moine
2014-02-04 17:54 ` Mark Brown
2014-02-04 17:54 ` Mark Brown
2014-02-04 17:54 ` Mark Brown
2014-02-04 18:59 ` Jean-Francois Moine
2014-02-04 18:59 ` Jean-Francois Moine
2014-02-04 18:59 ` Jean-Francois Moine
2014-02-04 19:40 ` Mark Brown
2014-02-04 19:40 ` Mark Brown
2014-01-27 8:48 ` [PATCH v3 4/5] ASoC: tda998x: adjust the audio hw parameters from EDID Jean-Francois Moine
2014-01-27 8:48 ` Jean-Francois Moine
2014-01-27 8:48 ` Jean-Francois Moine
2014-02-04 18:06 ` Mark Brown
2014-02-04 18:06 ` Mark Brown
2014-02-04 18:06 ` Mark Brown
2014-02-05 9:11 ` Jean-Francois Moine
2014-02-05 9:11 ` Jean-Francois Moine
2014-02-05 9:11 ` Jean-Francois Moine
2014-02-05 9:19 ` [alsa-devel] " Lars-Peter Clausen
2014-02-05 9:19 ` Lars-Peter Clausen
2014-02-05 9:19 ` Lars-Peter Clausen
2014-02-05 11:18 ` Mark Brown
2014-02-05 11:18 ` Mark Brown
2014-02-05 13:31 ` Lars-Peter Clausen
2014-02-05 13:31 ` Lars-Peter Clausen
2014-02-05 13:31 ` Lars-Peter Clausen
2014-02-05 14:08 ` Mark Brown
2014-02-05 14:08 ` Mark Brown
2014-02-05 18:07 ` Jean-Francois Moine
2014-02-05 18:07 ` Jean-Francois Moine
2014-02-05 18:07 ` Jean-Francois Moine
2014-02-05 18:21 ` Lars-Peter Clausen [this message]
2014-02-05 18:21 ` Lars-Peter Clausen
2014-02-05 18:21 ` Lars-Peter Clausen
2014-01-30 11:08 ` [PATCH v3 5/5] ASoC: tda998x: adjust the audio CTS_N pre-divider from audio format Jean-Francois Moine
2014-01-30 11:08 ` Jean-Francois Moine
2014-02-04 18:09 ` Mark Brown
2014-02-04 18:09 ` Mark Brown
2014-02-04 18:09 ` Mark Brown
2014-02-01 16:48 ` [PATCH v3 3/5] ASoC: tda998x: add DT documentation of the tda998x CODEC Jean-Francois Moine
2014-02-01 16:48 ` Jean-Francois Moine
2014-02-01 16:48 ` Jean-Francois Moine
[not found] ` <8e4231b7a55802f58a14dd07ac5cd8b0babb1dce.1391274628.git.moinejf-GANU6spQydw@public.gmane.org>
2014-02-01 18:30 ` Sergei Shtylyov
2014-02-01 18:30 ` Sergei Shtylyov
2014-02-01 18:30 ` Sergei Shtylyov
2014-02-04 18:12 ` Mark Brown
2014-02-04 18:12 ` Mark Brown
2014-02-04 18:12 ` Mark Brown
2014-02-04 19:02 ` Jean-Francois Moine
2014-02-04 19:02 ` Jean-Francois Moine
2014-02-04 19:02 ` Jean-Francois Moine
2014-02-04 19:54 ` Mark Brown
2014-02-04 19:54 ` Mark Brown
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=52F28123.1080102@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=moinejf@free.fr \
/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.