Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Apr 2017 21:07:38 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-multimedia@FreeBSD.org
Subject:   [Bug 218132] [snd_hda] audio channels are garbled or crossed over
Message-ID:  <bug-218132-5956-iM0PKQlSTq@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-218132-5956@https.bugs.freebsd.org/bugzilla/>
References:  <bug-218132-5956@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D218132

--- Comment #3 from Sean Bruno <sbruno@FreeBSD.org> ---
It appears that we may need to support seperate capture/playback streams,
perhaps.

Linux seems to use a different tag assignment process based on the flag=20

hda_controller.h:#define AZX_DCAPS_SEPARATE_STREAM_TAG  (1 << 30) /* capture
and playback use separate stream tag */

This seems to use two different identifiers in a 2 element array instead of=
 a
single integer.

hda_controller.c::azx_init_streams():

/* initialize SD streams */
int azx_init_streams(struct azx *chip)
{
        int i;
        int stream_tags[2] =3D { 0, 0 };

        /* initialize each stream (aka device)
         * assign the starting bdl address to each stream (device)
         * and initialize
         */
        for (i =3D 0; i < chip->num_streams; i++) {
                struct azx_dev *azx_dev =3D kzalloc(sizeof(*azx_dev),
GFP_KERNEL);=20
                int dir, tag;

                if (!azx_dev)
                        return -ENOMEM;

                dir =3D stream_direction(chip, i);
                /* stream tag must be unique throughout
                 * the stream direction group,
                 * valid values 1...15
                 * use separate stream tag if the flag
                 * AZX_DCAPS_SEPARATE_STREAM_TAG is used
                 */
                if (chip->driver_caps & AZX_DCAPS_SEPARATE_STREAM_TAG)
                        tag =3D ++stream_tags[dir];
                else
                        tag =3D i + 1;
                snd_hdac_stream_init(azx_bus(chip), azx_stream(azx_dev),
                                     i, dir, tag);
        }

        return 0;
}

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-218132-5956-iM0PKQlSTq>