.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * hdmi-codec.h - HDMI Codec driver API |
---|
3 | 4 | * |
---|
4 | | - * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com |
---|
| 5 | + * Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Jyri Sarha <jsarha@ti.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or |
---|
9 | | - * modify it under the terms of the GNU General Public License |
---|
10 | | - * version 2 as published by the Free Software Foundation. |
---|
11 | | - * |
---|
12 | | - * This program is distributed in the hope that it will be useful, but |
---|
13 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
15 | | - * General Public License for more details. |
---|
16 | 8 | */ |
---|
17 | 9 | |
---|
18 | 10 | #ifndef __HDMI_CODEC_H__ |
---|
.. | .. |
---|
42 | 34 | unsigned int frame_clk_inv:1; |
---|
43 | 35 | unsigned int bit_clk_master:1; |
---|
44 | 36 | unsigned int frame_clk_master:1; |
---|
| 37 | + /* bit_fmt could be standard PCM format or |
---|
| 38 | + * IEC958 encoded format. ALSA IEC958 plugin will pass |
---|
| 39 | + * IEC958_SUBFRAME format to the underneath driver. |
---|
| 40 | + */ |
---|
| 41 | + snd_pcm_format_t bit_fmt; |
---|
45 | 42 | }; |
---|
46 | 43 | |
---|
47 | 44 | /* |
---|
.. | .. |
---|
53 | 50 | int sample_rate; |
---|
54 | 51 | int sample_width; |
---|
55 | 52 | int channels; |
---|
56 | | - int mode; |
---|
57 | | -}; |
---|
58 | | - |
---|
59 | | -enum { |
---|
60 | | - LPCM = 0, |
---|
61 | | - NLPCM, |
---|
62 | | - HBR, |
---|
63 | 53 | }; |
---|
64 | 54 | |
---|
65 | 55 | typedef void (*hdmi_codec_plugged_cb)(struct device *dev, |
---|
.. | .. |
---|
75 | 65 | |
---|
76 | 66 | /* |
---|
77 | 67 | * Configures HDMI-encoder for audio stream. |
---|
78 | | - * Mandatory |
---|
| 68 | + * Having either prepare or hw_params is mandatory. |
---|
79 | 69 | */ |
---|
80 | 70 | int (*hw_params)(struct device *dev, void *data, |
---|
81 | 71 | struct hdmi_codec_daifmt *fmt, |
---|
82 | 72 | struct hdmi_codec_params *hparms); |
---|
| 73 | + |
---|
| 74 | + /* |
---|
| 75 | + * Configures HDMI-encoder for audio stream. Can be called |
---|
| 76 | + * multiple times for each setup. |
---|
| 77 | + * |
---|
| 78 | + * Having either prepare or hw_params is mandatory. |
---|
| 79 | + */ |
---|
| 80 | + int (*prepare)(struct device *dev, void *data, |
---|
| 81 | + struct hdmi_codec_daifmt *fmt, |
---|
| 82 | + struct hdmi_codec_params *hparms); |
---|
83 | 83 | |
---|
84 | 84 | /* |
---|
85 | 85 | * Shuts down the audio stream. |
---|
.. | .. |
---|
91 | 91 | * Mute/unmute HDMI audio stream. |
---|
92 | 92 | * Optional |
---|
93 | 93 | */ |
---|
94 | | - int (*digital_mute)(struct device *dev, void *data, bool enable); |
---|
| 94 | + int (*mute_stream)(struct device *dev, void *data, |
---|
| 95 | + bool enable, int direction); |
---|
95 | 96 | |
---|
96 | 97 | /* |
---|
97 | 98 | * Provides EDID-Like-Data from connected HDMI device. |
---|
.. | .. |
---|
114 | 115 | int (*hook_plugged_cb)(struct device *dev, void *data, |
---|
115 | 116 | hdmi_codec_plugged_cb fn, |
---|
116 | 117 | struct device *codec_dev); |
---|
| 118 | + |
---|
| 119 | + /* bit field */ |
---|
| 120 | + unsigned int no_capture_mute:1; |
---|
117 | 121 | }; |
---|
118 | 122 | |
---|
119 | 123 | /* HDMI codec initalization data */ |
---|