All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH - a52 plugin 1/1] fix reported input channel order
@ 2016-01-12  7:57 tom.ty89
  2016-01-12  8:48 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: tom.ty89 @ 2016-01-12  7:57 UTC (permalink / raw)
  To: patch; +Cc: alsa-devel, Tom Yan

From: Tom Yan <tom.ty89@gmail.com>

a52 plugin expects the input to be in ALSA order and remaps it to general order when encoding. However it reports that the input it takes should be in general order.

This fix should make programs (e.g. mpv) that is aware of channel layout reported by ALSA remap sources appropriately before sending when necessary.

It should not cause any regression to programs (e.g. mplayer) that does not check the reported channel layout (hence not affected by the issue) and remaps sources anyway.

Signed-off-by: Tom Yan <tom.ty89@gmail.com>

diff --git a/a52/pcm_a52.c b/a52/pcm_a52.c
index 4e4c5f7..88529eb 100644
--- a/a52/pcm_a52.c
+++ b/a52/pcm_a52.c
@@ -663,8 +663,8 @@ static unsigned int chmap4[4] = {
 };
 static unsigned int chmap6[6] = {
 	SND_CHMAP_FL, SND_CHMAP_FR,
-	SND_CHMAP_FC, SND_CHMAP_LFE,
 	SND_CHMAP_RL, SND_CHMAP_RR,
+	SND_CHMAP_FC, SND_CHMAP_LFE,
 };
 
 static snd_pcm_chmap_query_t **a52_query_chmaps(snd_pcm_ioplug_t *io ATTRIBUTE_UNUSED)
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH - a52 plugin 1/1] fix reported input channel order
  2016-01-12  7:57 [PATCH - a52 plugin 1/1] fix reported input channel order tom.ty89
@ 2016-01-12  8:48 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2016-01-12  8:48 UTC (permalink / raw)
  To: tom.ty89; +Cc: alsa-devel, patch

On Tue, 12 Jan 2016 08:57:39 +0100,
tom.ty89@gmail.com wrote:
> 
> From: Tom Yan <tom.ty89@gmail.com>
> 
> a52 plugin expects the input to be in ALSA order and remaps it to general order when encoding. However it reports that the input it takes should be in general order.
> 
> This fix should make programs (e.g. mpv) that is aware of channel layout reported by ALSA remap sources appropriately before sending when necessary.
> 
> It should not cause any regression to programs (e.g. mplayer) that does not check the reported channel layout (hence not affected by the issue) and remaps sources anyway.
> 
> Signed-off-by: Tom Yan <tom.ty89@gmail.com>

Applied now, thanks.


Takashi

> 
> diff --git a/a52/pcm_a52.c b/a52/pcm_a52.c
> index 4e4c5f7..88529eb 100644
> --- a/a52/pcm_a52.c
> +++ b/a52/pcm_a52.c
> @@ -663,8 +663,8 @@ static unsigned int chmap4[4] = {
>  };
>  static unsigned int chmap6[6] = {
>  	SND_CHMAP_FL, SND_CHMAP_FR,
> -	SND_CHMAP_FC, SND_CHMAP_LFE,
>  	SND_CHMAP_RL, SND_CHMAP_RR,
> +	SND_CHMAP_FC, SND_CHMAP_LFE,
>  };
>  
>  static snd_pcm_chmap_query_t **a52_query_chmaps(snd_pcm_ioplug_t *io ATTRIBUTE_UNUSED)
> -- 
> 2.7.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-12  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-12  7:57 [PATCH - a52 plugin 1/1] fix reported input channel order tom.ty89
2016-01-12  8:48 ` Takashi Iwai

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.