[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-14 Thread Russell King - ARM Linux
On Wed, Jan 14, 2015 at 12:50:56PM +, Mark Brown wrote: > Trying to hook up a controller that doesn't natively support this format > to a device that uses it is definitely tricky, as well as describing the > physical hookup we also need to worry about how things look to userspace > - it's ideal

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-14 Thread Mark Brown
On Wed, Jan 14, 2015 at 11:46:58AM +0100, Philipp Zabel wrote: > So the question is mostly whether four I2S data pins with a single > shared WS/SCK input should be called "four I2S ports with shared clocks" > or "one I2S port with up to four data lanes". I'd lean towards the > latter. Yes, this i

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-14 Thread Russell King - ARM Linux
On Wed, Jan 14, 2015 at 08:55:01AM +0100, Jean-Francois Moine wrote: > On Tue, 13 Jan 2015 19:54:15 + > Russell King - ARM Linux wrote: > > > On Tue, Jan 13, 2015 at 09:41:01PM +0200, Jyri Sarha wrote: > > > On 01/13/2015 09:26 PM, Russell King - ARM Linux wrote: > > > >SCLK: _~_~_~_~_~_~_~_~

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-14 Thread Philipp Zabel
Hi Russell, thanks for the clarification. Am Dienstag, den 13.01.2015, 19:54 + schrieb Russell King - ARM Linux: [...] > To represent that in DT, I would imagine we'd need something like this: > > #address-cells = <1>; > #size-cells = <0>; > ... > port at 1 {

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-14 Thread Jean-Francois Moine
On Tue, 13 Jan 2015 19:54:15 + Russell King - ARM Linux wrote: > On Tue, Jan 13, 2015 at 09:41:01PM +0200, Jyri Sarha wrote: > > On 01/13/2015 09:26 PM, Russell King - ARM Linux wrote: > > >SCLK: _~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_ > > > WS: __~~~

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-13 Thread Jyri Sarha
On 01/13/2015 09:26 PM, Russell King - ARM Linux wrote: > SCLK: _~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_ >WS: __~ > I2S1: llmmllmmllm > I2S2: llmm..

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-13 Thread Jean-Francois Moine
On Tue, 13 Jan 2015 16:03:13 + Russell King - ARM Linux wrote: > On Tue, Jan 13, 2015 at 04:54:11PM +0100, Jean-Francois Moine wrote: > > 4 streams on 4 different APs (sources) should work, but 4 streams from > > a same source should be detailed. > > I'd like to know how you intend to wire u

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-13 Thread Russell King - ARM Linux
On Tue, Jan 13, 2015 at 09:41:01PM +0200, Jyri Sarha wrote: > On 01/13/2015 09:26 PM, Russell King - ARM Linux wrote: > >SCLK: _~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_ > > WS: __~ > >I2S1: llmm.

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-13 Thread Russell King - ARM Linux
On Tue, Jan 13, 2015 at 08:02:52PM +0100, Jean-Francois Moine wrote: > On Tue, 13 Jan 2015 16:03:13 + > Russell King - ARM Linux wrote: > > > On Tue, Jan 13, 2015 at 04:54:11PM +0100, Jean-Francois Moine wrote: > > > 4 streams on 4 different APs (sources) should work, but 4 streams from > > >

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-13 Thread Jean-Francois Moine
On Tue, 13 Jan 2015 12:27:15 + Russell King - ARM Linux wrote: > On Tue, Jan 13, 2015 at 01:21:58PM +0100, Philipp Zabel wrote: > > I wonder if it wouldn't be nicer to have the AP# and type in the device > > tree and then calculate the register value from that in the driver. > > > > port

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-13 Thread Russell King - ARM Linux
On Tue, Jan 13, 2015 at 04:54:11PM +0100, Jean-Francois Moine wrote: > 4 streams on 4 different APs (sources) should work, but 4 streams from > a same source should be detailed. I'd like to know how you intend to wire up four different I2S sources to the TDA998x. Remember, an I2S source produces

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-13 Thread Philipp Zabel
Am Montag, den 12.01.2015, 17:57 + schrieb Russell King - ARM Linux: > On Mon, Jan 12, 2015 at 06:13:41PM +0100, Jean-Francois Moine wrote: > > On Mon, 12 Jan 2015 14:04:56 + > > Russell King - ARM Linux wrote: > > > On Mon, Jan 12, 2015 at 02:59:57PM +0100, Philipp Zabel wrote: > > > > No

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-13 Thread Russell King - ARM Linux
On Tue, Jan 13, 2015 at 01:21:58PM +0100, Philipp Zabel wrote: > I wonder if it wouldn't be nicer to have the AP# and type in the device > tree and then calculate the register value from that in the driver. > > port at 1 { > reg = <1>; /* AP1 */ > nxp,audio-port =

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-12 Thread Jean-Francois Moine
On Mon, 12 Jan 2015 17:57:06 + Russell King - ARM Linux wrote: > I don't particularly like that - that makes the assumption that AP0 > always means I2S. What if a future chip decides to allow SPDIF on > AP0? Why should we need to re-invent the binding? > > IMHO, it would be much better to

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-12 Thread Jean-Francois Moine
On Mon, 12 Jan 2015 14:04:56 + Russell King - ARM Linux wrote: > On Mon, Jan 12, 2015 at 02:59:57PM +0100, Philipp Zabel wrote: > > Am Montag, den 12.01.2015, 12:25 + schrieb Russell King - ARM Linux: > > > It's not quite that simple, because the SPDIF AP pins are multiplexed > > > with t

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-12 Thread Russell King - ARM Linux
On Mon, Jan 12, 2015 at 06:13:41PM +0100, Jean-Francois Moine wrote: > On Mon, 12 Jan 2015 14:04:56 + > Russell King - ARM Linux wrote: > > On Mon, Jan 12, 2015 at 02:59:57PM +0100, Philipp Zabel wrote: > > > Note that of_graph_parse_endpoint interprets the port node's reg > > > property as po

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-12 Thread Philipp Zabel
Am Montag, den 12.01.2015, 12:25 + schrieb Russell King - ARM Linux: > On Mon, Jan 12, 2015 at 10:25:28AM +0100, Philipp Zabel wrote: > > Jean-Francois' reply already reflects this, but the 'port' nodes should > > correspond to physical ports of the device if possible. If you can > > configure

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-12 Thread Russell King - ARM Linux
On Mon, Jan 12, 2015 at 02:59:57PM +0100, Philipp Zabel wrote: > Am Montag, den 12.01.2015, 12:25 + schrieb Russell King - ARM Linux: > > It's not quite that simple, because the SPDIF AP pins are multiplexed > > with the I2S pins - and there is variation between chip models and > > packages. >

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-12 Thread Russell King - ARM Linux
On Mon, Jan 12, 2015 at 10:25:28AM +0100, Philipp Zabel wrote: > Jean-Francois' reply already reflects this, but the 'port' nodes should > correspond to physical ports of the device if possible. If you can > configure the device to have dedicated input pins for I2S, SPDIF0, and > SPDIF1 at the same

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-12 Thread Philipp Zabel
Am Freitag, den 09.01.2015, 20:01 + schrieb Russell King - ARM Linux: [...] > Neither; we know that there are TDA998x devices which allow SPDIF to be > input via two separate pins, but only one to be active at any one time. > Given that the hardware is flexible in that regard, a binding which >

[alsa-devel] [PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-10 Thread Jean-Francois Moine
On Fri, 9 Jan 2015 20:01:27 + Russell King - ARM Linux wrote: > > I proposed: > > > > audio-ports = <0x04>, <0x03>; > > audio-port-names = "spdif", "i2s"; > > > > Do you better like: > > > > audio-spdif-port = <0x04>; > > audio-i2s-port = <0x03>; > > Neither; we know tha

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-09 Thread Russell King - ARM Linux
On Fri, Jan 09, 2015 at 06:38:57PM +0100, Jean-Francois Moine wrote: > On Fri, 9 Jan 2015 14:57:41 + > Russell King - ARM Linux wrote: > > What we do know is that there is a fixed mapping between AP pins and I2S > > channels (which are not PCM channels), but as you point out, we don't > > have

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-09 Thread Jean-Francois Moine
On Fri, 9 Jan 2015 14:57:41 + Russell King - ARM Linux wrote: > Well, if we look at the HDMI specs, there is a field in the audio info > frame (CA bits) which identifies the speaker allocation between the > HDMI PCM channels and the physical speakers. > > It describes a limited set - essenti

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-09 Thread Russell King - ARM Linux
On Fri, Jan 09, 2015 at 01:58:37PM +, Andrew Jackson wrote: > On 01/09/15 13:07, Russell King - ARM Linux wrote: > > On Fri, Jan 09, 2015 at 01:54:01PM +0100, Jean-Francois Moine wrote: > >> On Fri, 9 Jan 2015 11:45:29 + > >> Russell King - ARM Linux wrote: > >>> I think we need to underst

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-09 Thread Andrew Jackson
On 01/09/15 13:07, Russell King - ARM Linux wrote: > On Fri, Jan 09, 2015 at 01:54:01PM +0100, Jean-Francois Moine wrote: >> On Fri, 9 Jan 2015 11:45:29 + >> Russell King - ARM Linux wrote: >>> I think we need to understand exactly how the 998x map I2S inputs to the >>> HDMI channels to avoid

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-09 Thread Jean-Francois Moine
On Fri, 9 Jan 2015 11:45:29 + Russell King - ARM Linux wrote: > On Fri, Jan 09, 2015 at 12:30:36PM +0100, Jean-Francois Moine wrote: > > In my original version, the audio-ports are a bitmap of the pins, the > > bit 0 being the WS used for I2S. A fully wired tda998x would have been > > as: > >

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-09 Thread Russell King - ARM Linux
On Fri, Jan 09, 2015 at 01:54:01PM +0100, Jean-Francois Moine wrote: > On Fri, 9 Jan 2015 11:45:29 + > Russell King - ARM Linux wrote: > > I think we need to understand exactly how the 998x map I2S inputs to the > > HDMI channels to avoid making a mistake with the binding; remember, the > > bi

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-09 Thread Jean-Francois Moine
On Fri, 9 Jan 2015 12:13:04 +0200 Jyri Sarha wrote: > On 01/08/2015 06:42 PM, Jean-Francois Moine wrote: > > From Andrew's datasheet, the TDA998x's which are handled by the tda998x > > driver have only 4 input audio pins, the first two ones being either > > S/PDIF or I2s, the last ones being I2S

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-09 Thread Jyri Sarha
On 01/08/2015 06:42 PM, Jean-Francois Moine wrote: > On Thu, 8 Jan 2015 16:53:41 +0200 > Jyri Sarha wrote: > >>> + - audio-ports: must contain one or two values selecting the source >>> + in the audio port. >>> + The source type is given by the corresponding entry in >>> + the audio-port-na

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-09 Thread Russell King - ARM Linux
On Fri, Jan 09, 2015 at 12:30:36PM +0100, Jean-Francois Moine wrote: > In my original version, the audio-ports are a bitmap of the pins, the > bit 0 being the WS used for I2S. A fully wired tda998x would have been > as: > > audio-ports = <0x03>, <0x04>, <0x09>, <0x11>; > audio-port-nam

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-09 Thread Andrew Jackson
On 01/08/15 20:04, Mark Brown wrote: > On Thu, Jan 08, 2015 at 05:42:57PM +0100, Jean-Francois Moine wrote: > >> Examples: > >> - for the Cubox: > >> audio-inputs = "i2s", "spdif"; > >> - for some other board with I2S on the pins 3 and 4 only: > >> audio-inputs = "none", "none", "i2s

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-08 Thread Mark Brown
On Thu, Jan 08, 2015 at 05:42:57PM +0100, Jean-Francois Moine wrote: > Examples: > - for the Cubox: > audio-inputs = "i2s", "spdif"; > - for some other board with I2S on the pins 3 and 4 only: > audio-inputs = "none", "none", "i2s", "i2s"; > - for a fully wired TDA9983B (no driver

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-08 Thread Jean-Francois Moine
On Thu, 8 Jan 2015 16:53:41 +0200 Jyri Sarha wrote: > > + - audio-ports: must contain one or two values selecting the source > > + in the audio port. > > + The source type is given by the corresponding entry in > > + the audio-port-names property. > > + > > This binding does not allow m

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-08 Thread Jyri Sarha
On 01/07/2015 11:10 AM, Jean-Francois Moine wrote: > This patch permits the definition of the audio ports from the device tree. > > Signed-off-by: Jean-Francois Moine > --- > .../devicetree/bindings/drm/i2c/tda998x.txt| 18 +++ > drivers/gpu/drm/i2c/tda998x_drv.c |

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-07 Thread Jean-Francois Moine
On Wed, 07 Jan 2015 14:39:13 + Andrew Jackson wrote: > > + - audio-ports: must contain one or two values selecting the source > > + in the audio port. > > + The source type is given by the corresponding entry in > > + the audio-port-names property. > > I think that this entry might

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-07 Thread Mark Brown
On Wed, Jan 07, 2015 at 05:18:20PM +, Andrew Jackson wrote: > I understand your difficulty! I was just wanting something to clarify the > meaning of the value without reference to the driver source. > You could add something like this to your existing explanation: "The value > describes whi

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-07 Thread Andrew Jackson
On 01/07/15 17:08, Jean-Francois Moine wrote: > On Wed, 07 Jan 2015 14:39:13 + > Andrew Jackson wrote: > >>> + - audio-ports: must contain one or two values selecting the source >>> + in the audio port. >>> + The source type is given by the corresponding entry in >>> + the audio-port-n

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-07 Thread Andrew Jackson
On 01/07/15 09:10, Jean-Francois Moine wrote: > This patch permits the definition of the audio ports from the device tree. > > Signed-off-by: Jean-Francois Moine > --- > .../devicetree/bindings/drm/i2c/tda998x.txt| 18 +++ > drivers/gpu/drm/i2c/tda998x_drv.c | 60 >

[PATCH v9 1/4] drm/i2c: tda998x: Add DT support for audio

2015-01-07 Thread Jean-Francois Moine
This patch permits the definition of the audio ports from the device tree. Signed-off-by: Jean-Francois Moine --- .../devicetree/bindings/drm/i2c/tda998x.txt| 18 +++ drivers/gpu/drm/i2c/tda998x_drv.c | 60 ++ 2 files changed, 69 insertions(+), 9