On Mon, Oct 30, 2023 at 09:50:21AM +0000, Lucas Gabriel Vuotto wrote:
>Hi,
>
>On Sun, Oct 29, 2023 at 02:55:09PM +0100, Christopher Zimmermann wrote:
>> Index: azalia.c
>> ===================================================================
>> RCS file: /cvs/src/sys/dev/pci/azalia.c,v
>> retrieving revision 1.284
>> diff -u -p -r1.284 azalia.c
>> --- azalia.c 30 Jul 2023 08:46:03 -0000 1.284
>> +++ azalia.c 29 Oct 2023 13:39:04 -0000
>> @@ -950,28 +950,19 @@ azalia_init_codecs(azalia_t *az)
>> return(1);
>> }
>> - /* Use the first codec capable of analog I/O. If there are none,
>> - * use the first codec capable of digital I/O. Skip HDMI codecs.
>> - */
>> + /* Prefer analog over digital codecs over HDMI codecs. */
>> c = -1;
>> for (i = 0; i < az->ncodecs; i++) {
>> - codec = &az->codecs[i];
>> - if ((codec->audiofunc < 0) ||
>> - (codec->codec_type == AZ_CODEC_TYPE_HDMI))
>> - continue;
>> - if (codec->codec_type == AZ_CODEC_TYPE_DIGITAL) {
>> - if (c < 0)
>> - c = i;
>> - } else {
>> + if (az->codecs[i].audiofunc >= 0 &&
>> + (c = -1 ||
>
>Shouldn't this be "c == -1"?
indeed.
>> + az->codecs[i].codec_type < az->codecs[c].codec_type))
>> c = i;
>> - break;
>> - }
>> }
>> - az->codecno = c;
>> - if (az->codecno < 0) {
>> + if (c == -1) {
>> printf("%s: no supported codecs\n", XNAME(az));
>> return(1);
>> }
>> + az->codecno = c;
>> printf("%s: codecs: ", XNAME(az));
>> for (i = 0; i < az->ncodecs; i++) {
>>
No comments:
Post a Comment