[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-multimedia
Subject:    [Bug 218132] [snd_hda] audio channels are garbled or crossed over
From:       bugzilla-noreply () freebsd ! org
Date:       2017-04-10 21:07:38
Message-ID: bug-218132-5956-iM0PKQlSTq () https ! bugs ! freebsd ! org/bugzilla/
[Download RAW message or body]

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218132

--- 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 

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] = { 0, 0 };

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

                if (!azx_dev)
                        return -ENOMEM;

                dir = 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 = ++stream_tags[dir];
                else
                        tag = i + 1;
                snd_hdac_stream_init(azx_bus(chip), azx_stream(azx_dev),
                                     i, dir, tag);
        }

        return 0;
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-multimedia@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic