hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/include/sound/hdmi-codec.h
....@@ -1,18 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * hdmi-codec.h - HDMI Codec driver API
34 *
4
- * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
5
+ * Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com
56 *
67 * 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.
168 */
179
1810 #ifndef __HDMI_CODEC_H__
....@@ -42,6 +34,11 @@
4234 unsigned int frame_clk_inv:1;
4335 unsigned int bit_clk_master:1;
4436 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;
4542 };
4643
4744 /*
....@@ -53,13 +50,6 @@
5350 int sample_rate;
5451 int sample_width;
5552 int channels;
56
- int mode;
57
-};
58
-
59
-enum {
60
- LPCM = 0,
61
- NLPCM,
62
- HBR,
6353 };
6454
6555 typedef void (*hdmi_codec_plugged_cb)(struct device *dev,
....@@ -75,11 +65,21 @@
7565
7666 /*
7767 * Configures HDMI-encoder for audio stream.
78
- * Mandatory
68
+ * Having either prepare or hw_params is mandatory.
7969 */
8070 int (*hw_params)(struct device *dev, void *data,
8171 struct hdmi_codec_daifmt *fmt,
8272 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);
8383
8484 /*
8585 * Shuts down the audio stream.
....@@ -91,7 +91,8 @@
9191 * Mute/unmute HDMI audio stream.
9292 * Optional
9393 */
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);
9596
9697 /*
9798 * Provides EDID-Like-Data from connected HDMI device.
....@@ -114,6 +115,9 @@
114115 int (*hook_plugged_cb)(struct device *dev, void *data,
115116 hdmi_codec_plugged_cb fn,
116117 struct device *codec_dev);
118
+
119
+ /* bit field */
120
+ unsigned int no_capture_mute:1;
117121 };
118122
119123 /* HDMI codec initalization data */