[alsa-devel] [PATCH] ALSA: hda - Set channels count for HBR format

Wang, Xingchao xingchao.wang at intel.com
Tue Aug 7 09:40:40 CEST 2012


Hi Takashi,

When test HBR feature, unless specify the channel number in command line(as below), alsa will be confused about the real channel number.

aplay -D hdmi:DEV=1,AES0=0x06 -c8 -fs16_le -r192000 testi.dtshd.20120730.ma-71-24.spdif

If the HBR stream is gone through pulseaudio(regarded as passthrough), the channels number is faked. 

Thanks
--xingchao

> -----Original Message-----
> From: alsa-devel-bounces at alsa-project.org
> [mailto:alsa-devel-bounces at alsa-project.org] On Behalf Of Wang Xingchao
> Sent: Tuesday, August 07, 2012 3:20 PM
> To: alsa-devel at alsa-project.org; tiwai at suse.de
> Cc: Wang, Xingchao
> Subject: [alsa-devel] [PATCH] ALSA: hda - Set channels count for HBR format
> 
> If it's HBR format, the channels count should be 8.
> 
> Signed-off-by: Wang Xingchao <xingchao.wang at intel.com>
> ---
>  sound/pci/hda/patch_hdmi.c |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index
> ad319d4..ae4e67e 100644
> --- a/sound/pci/hda/patch_hdmi.c
> +++ b/sound/pci/hda/patch_hdmi.c
> @@ -1153,8 +1153,11 @@ static int
> generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
>  	struct hdmi_spec *spec = codec->spec;
>  	int pin_idx = hinfo_to_pin_index(spec, hinfo);
>  	hda_nid_t pin_nid = spec->pins[pin_idx].pin_nid;
> -
> -	hdmi_set_channel_count(codec, cvt_nid, substream->runtime->channels);
> +
> +	if (is_hbr_format(format))
> +		hdmi_set_channel_count(codec, cvt_nid, 8);
> +	else
> +		hdmi_set_channel_count(codec, cvt_nid,
> substream->runtime->channels);
> 
>  	hdmi_setup_audio_infoframe(codec, pin_idx, substream);
> 
> --
> 1.7.9.5
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


More information about the Alsa-devel mailing list