alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Jyri Sarha <jsarha@ti.com>
To: Joachim Eastwood <manabian@gmail.com>
Cc: alsa-devel@alsa-project.org, linux-fbdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-omap@vger.kernel.org,
	liam.r.girdwood@linux.intel.com, detheridge@ti.com,
	broonie@kernel.org, peter.ujfalusi@ti.com,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Benoit Cousson <bcousson@baylibre.com>
Subject: Re: [alsa-devel] [PATCH 00/19] Rework OMAP4+ HDMI audio support
Date: Wed, 14 May 2014 13:02:22 +0300	[thread overview]
Message-ID: <53733F2E.4030803@ti.com> (raw)
In-Reply-To: <CAGhQ9VzjndCBp+ZHS3XPPvS4ors6u9BfHf4NY_HNYN5ynyQOYQ@mail.gmail.com>

On 05/13/2014 12:13 AM, Joachim Eastwood wrote:
> On 12 May 2014 11:12, Jyri Sarha <jsarha@ti.com> wrote:
...
>
> hey, this worked straight away :)
>
> But there seems to be something wrong with the channel mapping.
>
> For stereo (speaker-test -c 2) the mapping is correct.
>
> But for -c 4 and -c 8 it gets weird:
> speaker-test -c 4 -s X # where X is 1-4
> 1: Front Left is Rear Left
> 2: Front Right is Rear Right
> 3: Rear Right is Front Right
> 4: Rear Left is Front Left
>
> speaker-test -c 8 -s X # where X is 1-8
> 1: Front Left is Rear Left
> 2: Center is Rear Left
> 3: Front Right is Rear Right
> 4: Side Right is Front Right
> 5: Rear Right is silent
> 6: Rear Left is Center
> 7: Side Left is Front Left
> 8: LFE - Rear Right
>
> I think you need to check what channel order ALSA expects. I believe
> speaker-test does the right thing on my HTPC normally connected to my
> receiver.
>

I checked the implementation and there was indeed something weird there, 
but the implementation can not explain the FL and FR channels jumping 
around. FL and FL should always be the first two channels in all 
configurations and the implementation does not touch them.

The implementation uses 8ch HDMI setup for anything above 2ch with 
"Audio InfoFrame Data Byte 4" set to 0x13. According to CEA-861 specs 
this means following channel order: FL, FR, LFE, FC, RL, RR, RLC, RRC

This is a closest match to ALSA 8ch mapping (according to 
sound/core/pcm_lib.c) which is: FL, FR, FC, LFE, RL, RR, SL, SR

Current implementation has FLE and FC channels correctly swapped, but it 
shifts them to last two channels and RL, RR, SL, SR are shifted down to 
fill the place. This is all wrong and I'll try to come up with a fix for 
that. Unfortunately I can not test anything beyond 2 ch myself so I 
would need someone to volunteer to test my patch.

Best regards,
Jyri

  reply	other threads:[~2014-05-14 10:02 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12  9:12 [PATCH 00/19] Rework OMAP4+ HDMI audio support Jyri Sarha
2014-05-12  9:12 ` [PATCH 01/19] ASoC: omap-pcm: Move omap-pcm under include/sound Jyri Sarha
2014-05-12  9:12 ` [PATCH 02/19] OMAPDSS: hdmi-common: Add hdmi_dss_audio_from_hw_params() Jyri Sarha
2014-05-12  9:12 ` [PATCH 03/19] OMAPDSS: hdmi4: Remove callbacks for an external ASoC DAI driver Jyri Sarha
2014-05-12  9:12 ` [PATCH 04/19] OMAPDSS: hdmi4: Integrated ASoC DAI component driver implementation Jyri Sarha
     [not found] ` <cover.1399884780.git.jsarha-l0cyMroinI0@public.gmane.org>
2014-05-12  9:12   ` [PATCH 05/19] OMAPDSS: Kconfig: Add depencies and help section to OMAP4_DSS_HDMI_AUDIO Jyri Sarha
2014-05-16 10:52     ` Tomi Valkeinen
2014-05-16 11:56       ` Jyri Sarha
2014-05-12  9:12   ` [PATCH 07/19] OMAPDSS: hdmi5_core: Fix compilation with OMAP5_DSS_HDMI_AUDIO Jyri Sarha
2014-05-16 10:31     ` Tomi Valkeinen
2014-05-12  9:12   ` [PATCH 13/19] ARM: omap4.dtsi: Add audio related parametes to hdmi node Jyri Sarha
2014-05-12  9:12 ` [PATCH 06/19] OMAPDSS: hdmi.h: Add HDMI_AUDIO_LAYOUT_6CH enum value Jyri Sarha
2014-05-12  9:12 ` [PATCH 08/19] OMAPDSS: hdmi5: Remove callbacks for an external ASoC DAI driver Jyri Sarha
2014-05-12  9:12 ` [PATCH 09/19] OMAPDSS: hdmi5: Integrated ASoC DAI component driver implementation Jyri Sarha
2014-05-12  9:12 ` [PATCH 10/19] OMAPDSS: Kconfig: Add depencies and help section to OMAP5_DSS_HDMI_AUDIO Jyri Sarha
2014-05-12  9:12 ` [PATCH 11/19] ASoC: omap: Remove obsolete HDMI audio code and Kconfig options Jyri Sarha
2014-05-12 17:22   ` Mark Brown
2014-05-12  9:12 ` [PATCH 12/19] OMAPDSS: Remove obsolete audio code Jyri Sarha
2014-05-12  9:12 ` [PATCH 14/19] ARM: omap4-panda-common.dtsi: Add HDMI audio nodes Jyri Sarha
2014-05-16 11:04   ` Tomi Valkeinen
2014-05-16 11:08     ` Mark Brown
2014-05-12  9:12 ` [PATCH 15/19] ARM: omap5.dtsi: Add audio related parameters to hdmi node Jyri Sarha
2014-05-12  9:12 ` [PATCH 16/19] ARM: omap5-uevm.dts: Add hdmi audio related nodes Jyri Sarha
2014-05-12  9:12 ` [PATCH 17/19] ARM: omap2plus_defconfig: Build DSS HDMI support for OMAP4 in kernel Jyri Sarha
2014-05-12  9:12 ` [PATCH 18/19] ARM: omap2plus_defconfig: Enable OMAP5 HDMI support Jyri Sarha
2014-05-12  9:12 ` [PATCH 19/19] ARM: omap2plus_defconfig: Enable OMAP4+ HDMI audio support Jyri Sarha
2014-05-12 15:06 ` [PATCH 00/19] Rework " Tony Lindgren
2014-05-23 11:02   ` Tomi Valkeinen
2014-05-23 14:46     ` Tony Lindgren
2014-05-12 21:13 ` [alsa-devel] " Joachim Eastwood
2014-05-14 10:02   ` Jyri Sarha [this message]
2014-05-14 16:25     ` Joachim Eastwood
2014-05-17  8:51       ` Joachim Eastwood
2014-05-17  9:16         ` Joachim Eastwood
2014-05-19 14:44           ` Jyri Sarha

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=53733F2E.4030803@ti.com \
    --to=jsarha@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bcousson@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=detheridge@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=manabian@gmail.com \
    --cc=peter.ujfalusi@ti.com \
    --cc=tomi.valkeinen@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).