From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Francois Moine Subject: Re: [alsa-devel] [PATCH v3 4/5] ASoC: tda998x: adjust the audio hw parameters from EDID Date: Wed, 5 Feb 2014 19:07:32 +0100 Message-ID: <20140205190732.5617f200@armhf> References: <1b15025671d9099863a3091346536e45891e4a26.1391274628.git.moinejf@free.fr> <20140204180625.GM22609@sirena.org.uk> <20140205101134.4591e5c3@armhf> <52F2021A.9020804@metafoo.de> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <52F2021A.9020804@metafoo.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Lars-Peter Clausen Cc: alsa-devel@alsa-project.org, Russell King - ARM Linux , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Mark Brown , linux-arm-kernel@lists.infradead.org List-Id: alsa-devel@alsa-project.org T24gV2VkLCAwNSBGZWIgMjAxNCAxMDoxOToyMiArMDEwMApMYXJzLVBldGVyIENsYXVzZW4gPGxh cnNAbWV0YWZvby5kZT4gd3JvdGU6Cgo+ID4gU28sIGluIHRoZSBDT0RFQywgSSBkb24ndCBzZWUg aG93IEkgY291bGQgdXBkYXRlIHRoZSBwYXJhbWV0ZXJzCj4gPiBkaWN0YXRlZCBieSB0aGUgRURJ RCBvdGhlcndpc2UgaW4gY2hhbmdpbmcgdGhlIERBSSBkcml2ZXIgcGFyYW1ldGVycy4KPiA+ICAK PiAKPiBUaGUgc3RhcnR1cCBmdW5jdGlvbiBpcyB0aGUgcmlnaHQgcGxhY2UuIEJ1dCBpbnN0ZWFk IG9mIG1vZGlmeWluZyB0aGUgREFJIAo+IHVzZSBzbmRfcGNtX2h3X2NvbnN0cmFpbnRfbWFzazY0 KCksIHNuZF9wY21faHdfY29uc3RyYWludF9saXN0KCksIGV0Yy4gdG8gCj4gc2V0dXAgdGhlIGFk ZGl0aW9uYWwgY29uc3RyYWludHMgdGhhdCBjb21lIGZyb20gdGhlIEVESUQuCgpJdCBpcyBtb3Jl IGNvbXBsaWNhdGVkLCBidXQgaXQgd29ya3MuIE5ldmVydGhlbGVzcywgSSBoYXZlIDIgcHJvYmxl bXM6CgotIHNuZF9wY21faHdfY29uc3RyYWludF9saXN0KCkga2VlcHMgYSBwb2ludGVyIHRvIHRo ZSBsaXN0LCBzbywgaXQKICBjYW5ub3QgYmUgaW4gdGhlIHN0YWNrLiBJdCBmaXggdGhpcyB3aXRo IHN0YXRpYyBzdHJ1Y3QgYW5kIHJhdGUgYXJyYXkuCgotIHNuZF9wY21faHdfY29uc3RyYWludF9t YXNrNjQoKSBpcyBub3QgZXhwb3J0ZWQuCiAgSXMgdGhlcmUgYW4gb3RoZXIgd2F5IHRvIHNldCBj b25zdHJhaW50cyBvbiB0aGUgZm9ybWF0cy9zYW1wbGUgd2lkdGhzPwoKLS0gCktlbiBhciBjJ2hl bnRhw7EJfAkgICAgICAqKiBCcmVpemggaGEgTGludXggYXRhdiEgKioKSmVmCQl8CQlodHRwOi8v bW9pbmVqZi5mcmVlLmZyLwpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fXwpkcmktZGV2ZWwgbWFpbGluZyBsaXN0CmRyaS1kZXZlbEBsaXN0cy5mcmVlZGVza3Rv cC5vcmcKaHR0cDovL2xpc3RzLmZyZWVkZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2RyaS1k ZXZlbAo= From mboxrd@z Thu Jan 1 00:00:00 1970 From: moinejf@free.fr (Jean-Francois Moine) Date: Wed, 5 Feb 2014 19:07:32 +0100 Subject: [alsa-devel] [PATCH v3 4/5] ASoC: tda998x: adjust the audio hw parameters from EDID In-Reply-To: <52F2021A.9020804@metafoo.de> References: <1b15025671d9099863a3091346536e45891e4a26.1391274628.git.moinejf@free.fr> <20140204180625.GM22609@sirena.org.uk> <20140205101134.4591e5c3@armhf> <52F2021A.9020804@metafoo.de> Message-ID: <20140205190732.5617f200@armhf> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, 05 Feb 2014 10:19:22 +0100 Lars-Peter Clausen 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. - snd_pcm_hw_constraint_mask64() is not exported. Is there an other way to set constraints on the formats/sample widths? -- Ken ar c'henta? | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751912AbaBESHd (ORCPT ); Wed, 5 Feb 2014 13:07:33 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:50389 "EHLO smtp1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750933AbaBESHa convert rfc822-to-8bit (ORCPT ); Wed, 5 Feb 2014 13:07:30 -0500 Date: Wed, 5 Feb 2014 19:07:32 +0100 From: Jean-Francois Moine To: Lars-Peter Clausen Cc: Mark Brown , alsa-devel@alsa-project.org, Russell King - ARM Linux , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Clark , Dave Airlie , linux-arm-kernel@lists.infradead.org Subject: Re: [alsa-devel] [PATCH v3 4/5] ASoC: tda998x: adjust the audio hw parameters from EDID Message-ID: <20140205190732.5617f200@armhf> In-Reply-To: <52F2021A.9020804@metafoo.de> References: <1b15025671d9099863a3091346536e45891e4a26.1391274628.git.moinejf@free.fr> <20140204180625.GM22609@sirena.org.uk> <20140205101134.4591e5c3@armhf> <52F2021A.9020804@metafoo.de> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; arm-unknown-linux-gnueabihf) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 05 Feb 2014 10:19:22 +0100 Lars-Peter Clausen 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. - snd_pcm_hw_constraint_mask64() is not exported. Is there an other way to set constraints on the formats/sample widths? -- Ken ar c'hentaƱ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/