Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2012 22:22:24 -0600
From:      Zhihao Yuan <lichray@gmail.com>
To:        Alexander Motin <mav@freebsd.org>
Cc:        =?UTF-8?Q?Micka=C3=ABl_Maillot?= <mickael.maillot@gmail.com>, freebsd-multimedia@freebsd.org, FreeBSD current <freebsd-current@freebsd.org>
Subject:   Re: [RFT] Major snd_hda rewrite
Message-ID:  <CAGsORuC_QbU7UQ2sdxH=ROUk_E44nyZqnLGk9jdorD0DRYkS4g@mail.gmail.com>
In-Reply-To: <4F1F412D.5040009@FreeBSD.org>
References:  <4F0DE3FD.2020203@FreeBSD.org> <20120112121853.GC1429@procyon.xvoid.org> <4F0ED8D0.8080403@FreeBSD.org> <CAKT0JB5xP__9KacknmkT8_QrC1hsq8Gj5quRY_FvgmB=sJGmSQ@mail.gmail.com> <4F171D7A.4080003@FreeBSD.org> <CAKT0JB6u-b1CTcYVphLnEf-rHCmuSLJJFrYOiiqChJKDYtRHtQ@mail.gmail.com> <4F177979.5010106@FreeBSD.org> <CAKT0JB7k0V42w0WGN1mq4sKgQxqbnf_NoDRZAxPrMGebuvUH2g@mail.gmail.com> <CAKT0JB5zOjmy1R13W%2BbY453VySOkYcShpnHwk8kbT=-yAUC2vQ@mail.gmail.com> <CAKT0JB5xHJ7=UFHDhumsiMqfYGEPV6QyNz2YbHb%2BojOUgw23WA@mail.gmail.com> <4F1ACBA8.6000203@FreeBSD.org> <CAKT0JB7Z=pwv9oryCcu2OV7kHnkXjPj-cYY_=0c6PMbNF1BLTw@mail.gmail.com> <4F1EB305.9000105@FreeBSD.org> <4F1EDD3D.6070800@FreeBSD.org> <CAKT0JB5jAr6VP5Q9sBVG6hFrnn%2BWafEDWT43yKhdXJuWv4U8pw@mail.gmail.com> <4F1F31CA.5000507@FreeBSD.org> <4F1F34DB.9040405@FreeBSD.org> <CAKT0JB7KfOepO9C6dBx7TRoR4qDRQ3V=V69zz=9BFtWOwqhpMQ@mail.gmail.com> <4F1F412D.5040009@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 24, 2012 at 5:39 PM, Alexander Motin <mav@freebsd.org> wrote:
> On 25.01.2012 01:32, Micka=C3=ABl Maillot wrote:
>>
>> 2012/1/24 Alexander Motin <mav@freebsd.org <mailto:mav@freebsd.org>>
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0Number of channels should be set to 8 by appl=
ication when it
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0expects bit
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0rate above 6Mbps. Sample rate, as I've descri=
bed, just give more
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0fine
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0control. Increasing sample rate does not auto=
matically increase
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0channels. They are orthogonal:
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0Rate 48 96 192 48 96 192
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0Channels 2 2 2 8 8 8
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0------------------------------__-------------=
---------------
>>
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0Mbps 1.5 3 6 12 24 49
>>
>>
>> ok so set 8 channels is just to allow more bandwidth.
>> i just looked at alsa hdmi code (because i never find oss code that can
>> play hd audio),
>> they set 192k and 8 channels for every DTS HD / TRUEHD / E-AC3 file, so
>> i was thinking to do the same.
>
>
> HBR mode (8 channels) is not always supported by hardware and not defined=
 by
> HDMI 1.1 spec (not sure about 1.2). So I think if possible, it would be n=
ice
> to differentiate them.
>
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0What I've forgot is to allow 8ch format. :) A=
dd the patch below.
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0Hope
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0sound(4) has no other limitations for it.
>>
>> =C2=A0 =C2=A0Hmm. Looks like there is some limitation. You may grep kern=
el for
>> =C2=A0 =C2=A0AFMT_PASSTHROUGH and find two "XXX force ..." comments and =
code,
>> =C2=A0 =C2=A0including forcing 2 channels for AC3. Luckily for not part =
for
>> =C2=A0 =C2=A0frequency is commented out. Further we may try to comment o=
r modify
>> =C2=A0 =C2=A0part about number of channels.
>>
>> spotted and commented
>>
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0--- hdaa.c (revision 230511)
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0+++ hdaa.c (working copy)
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0@@ -4979,6 +4979,8 @@
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0}
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0if (HDA_PARAM_SUPP_STREAM___FORMATS_AC3(fmtca=
p)) {
>>
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0ch->fmtlist[i++] =3D SND_FORMAT(AFMT_AC3, 2, =
0);
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0+ if (channels >=3D 8)
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0+ ch->fmtlist[i++] =3D SND_FORMAT(AFMT_AC3, 8=
, 0);
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0}
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0ch->fmtlist[i] =3D 0;
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0i =3D 0;
>>
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0But in your case I think it should be enough =
to just increase
>> sample
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0rate to 96 or 192KHz.
>>
>> so if my problem persist after settings 8 channels, i'll blame xbmc oss
>> part.
>
>
> Can't wait to know result. :)
>
> --
> Alexander Motin
>
> _______________________________________________
> freebsd-multimedia@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
> To unsubscribe, send any mail to
> "freebsd-multimedia-unsubscribe@freebsd.org"

Oops, device_delete_children is not available on 8_RELENG.

--=20
Zhihao Yuan, nickname lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGsORuC_QbU7UQ2sdxH=ROUk_E44nyZqnLGk9jdorD0DRYkS4g>