source: mainline/uspace/drv/audio/hdaudio/codec.h

Last change on this file was 0d59ea7e, checked in by Jiri Svoboda <jiri@…>, 3 years ago

Multiple HD Audio converters cannot pull from a single stream

We select one arbitrary output converter for out PCM output, similar to what
we do for input.

We filter the 'other' VirtualBox output converters based on rates/formats
being zero.

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[d2d5329]1/*
[0d59ea7e]2 * Copyright (c) 2022 Jiri Svoboda
[d2d5329]3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup hdaudio
30 * @{
31 */
32/** @file High Definition Audio controller
33 */
34
35#ifndef CODEC_H
36#define CODEC_H
37
38#include "hdaudio.h"
[3fec817]39#include "stream.h"
[d2d5329]40
41typedef struct hda_codec {
42 hda_t *hda;
43 uint8_t address;
[0d59ea7e]44 int out_aw;
45 uint32_t out_aw_rates;
46 uint32_t out_aw_formats;
[1e92bc3]47 int out_aw_num;
48 int out_aw_sel;
[0e4c5f0]49 int in_aw;
[0d59ea7e]50 uint32_t in_aw_rates;
51 uint32_t in_aw_formats;
[d2d5329]52} hda_codec_t;
53
54extern hda_codec_t *hda_codec_init(hda_t *, uint8_t);
55extern void hda_codec_fini(hda_codec_t *);
[b7fd2a0]56extern errno_t hda_out_converter_setup(hda_codec_t *, hda_stream_t *);
57extern errno_t hda_in_converter_setup(hda_codec_t *, hda_stream_t *);
[d2d5329]58
59#endif
60
61/** @}
62 */
Note: See TracBrowser for help on using the repository browser.