From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752670AbaBMHcO (ORCPT ); Thu, 13 Feb 2014 02:32:14 -0500 Received: from mail-bn1blp0184.outbound.protection.outlook.com ([207.46.163.184]:6770 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751417AbaBMHcN convert rfc822-to-8bit (ORCPT ); Thu, 13 Feb 2014 02:32:13 -0500 From: "Li.Xiubo@freescale.com" To: Mark Brown , Lars-Peter Clausen CC: "lgirdwood@gmail.com" , "alsa-devel@alsa-project.org" , "kuninori.morimoto.gx@renesas.com" , "tiwai@suse.de" , "linux-kernel@vger.kernel.org" Subject: RE: [alsa-devel] [PATCH v2 1/3] ASoC: binding: add tdm-slot.txt Thread-Topic: [alsa-devel] [PATCH v2 1/3] ASoC: binding: add tdm-slot.txt Thread-Index: AQHPJ886eVFKbCp270GIE9eQNPH9P5qxWYEAgAAc+ICAAUkhIA== Date: Thu, 13 Feb 2014 07:32:10 +0000 Message-ID: <2eae2c076b7540448be19e9c91a58ee0@BY2PR03MB505.namprd03.prod.outlook.com> References: <1392191112-27028-1-git-send-email-Li.Xiubo@freescale.com> <1392191112-27028-2-git-send-email-Li.Xiubo@freescale.com> <52FB3E5C.8040701@metafoo.de> <20140212111033.GD28112@sirena.org.uk> In-Reply-To: <20140212111033.GD28112@sirena.org.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.88.158.215] x-forefront-prvs: 0121F24F22 x-forefront-antispam-report: SFV:NSPM;SFS:(10009001)(6009001)(51704005)(164054003)(199002)(189002)(53806001)(54316002)(56776001)(63696002)(85306002)(79102001)(51856001)(74366001)(76482001)(54356001)(74876001)(69226001)(74706001)(87936001)(80976001)(77982001)(59766001)(66066001)(80022001)(65816001)(33646001)(83322001)(76576001)(74502001)(74662001)(90146001)(76786001)(76796001)(31966008)(85852003)(81342001)(83072002)(92566001)(81686001)(81816001)(56816005)(81542001)(4396001)(49866001)(50986001)(47976001)(87266001)(47736001)(46102001)(95666001)(94946001)(94316002)(47446002)(93516002)(86362001)(93136001)(74316001)(2656002)(95416001)(24736002);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR03MB505;H:BY2PR03MB505.namprd03.prod.outlook.com;CLIP:192.88.158.215;FPR:E472C52E.2F391319.81FCB1B3.4EE5E168.2028F;InfoNoRecordsA:1;MX:1;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > The current internal API for TDM is very poor, I don't think we want > > to expose that 1 to 1 to the devicetree. Since this means we'd have > > to support that forever. The first thing is that the semantics of > > snd_soc_dai_set_tdm_slot() are very unclear. E.g. some drivers use a > > zero bit for a active slot, some drivers use a 1 bit for a active > > Yes, and if we do end up using masks we need to nail down what's going > on in the DT. > Yes, certainly. > > slot. The second thing is that we are not able to specify which > > channel should be mapped to which slot. You can merely specify > > from/to which slots the CODEC should read/write and then it is up to > > the driver to guess which channel should go to which slot. In my > > opinion a binding that allows to specify a explicit mapping of which > > channel goes to which slot would be much better. > > It'd certainly be good to be able to do that, though having a default > would make life easier. > @Lars, @Mark, Yes, then will that means that we can just end up parsing masks from DT and the masks will be generated by the driver specified dai->driver->ops->of_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask) callback or one default snd_soc_of_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask), and the 'slots' is the number of the slot parsed from the DT node ? Or other better ways ? Thanks, -- Best Regards, Xiubo > > Also those are four different settings. In my opinion they should > > not be expressed in one property, but rather in four. E.g. > > specifying a tx_mask for a rx only device does not make much sense. > > That makes sense.