Skip to content

Commit 44f2893

Browse files
committed
media: vidtv.rst: add kernel-doc markups
Fix existing issues at the kernel-doc markups and add them to the vidtv.rst file. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent 020120a commit 44f2893

10 files changed

Lines changed: 70 additions & 32 deletions

File tree

Documentation/driver-api/media/drivers/vidtv.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,3 +484,30 @@ A nice addition is to simulate some noise when the signal quality is bad by:
484484
- Updating the error statistics accordingly (e.g. BER, etc).
485485

486486
- Simulating some noise in the encoded data.
487+
488+
Functions and structs used within vidtv
489+
---------------------------------------
490+
491+
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_bridge.h
492+
493+
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_channel.h
494+
495+
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_demod.h
496+
497+
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_encoder.h
498+
499+
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_mux.h
500+
501+
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_pes.h
502+
503+
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_psi.h
504+
505+
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_s302m.h
506+
507+
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_ts.h
508+
509+
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_tuner.h
510+
511+
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_common.c
512+
513+
.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_tuner.c

drivers/media/test-drivers/vidtv/vidtv_bridge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* @adapter: Represents a DTV adapter. See 'dvb_register_adapter'.
3535
* @demux: The demux used by the dvb_dmx_swfilter_packets() call.
3636
* @dmx_dev: Represents a demux device.
37-
* @dmx_frontend: The frontends associated with the demux.
37+
* @dmx_fe: The frontends associated with the demux.
3838
* @i2c_adapter: The i2c_adapter associated with the bridge driver.
3939
* @i2c_client_demod: The i2c_clients associated with the demodulator modules.
4040
* @i2c_client_tuner: The i2c_clients associated with the tuner modules.

drivers/media/test-drivers/vidtv/vidtv_channel.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
* Every stream will have its corresponding encoder polled to produce TS packets
4040
* These packets may be interleaved by the mux and then delivered to the bridge
4141
*
42+
* @name: name of the channel
4243
* @transport_stream_id: a number to identify the TS, chosen at will.
4344
* @service: A _single_ service. Will be concatenated into the SDT.
4445
* @program_num: The link between PAT, PMT and SDT.

drivers/media/test-drivers/vidtv/vidtv_demod.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
* modulation and fec_inner
2121
* @modulation: see enum fe_modulation
2222
* @fec: see enum fe_fec_rate
23+
* @cnr_ok: S/N threshold to consider the signal as OK. Below that, there's
24+
* a chance of losing sync.
25+
* @cnr_good: S/N threshold to consider the signal strong.
2326
*
2427
* This struct matches values for 'good' and 'ok' CNRs given the combination
2528
* of modulation and fec_inner in use. We might simulate some noise if the
@@ -53,13 +56,8 @@ struct vidtv_demod_config {
5356
* struct vidtv_demod_state - The demodulator state
5457
* @frontend: The frontend structure allocated by the demod.
5558
* @config: The config used to init the demod.
56-
* @poll_snr: The task responsible for periodically checking the simulated
57-
* signal quality, eventually dropping or reacquiring the TS lock.
5859
* @status: the demod status.
59-
* @cold_start: Whether the demod has not been init yet.
60-
* @poll_snr_thread_running: Whether the task responsible for periodically
61-
* checking the simulated signal quality is running.
62-
* @poll_snr_thread_restart: Whether we should restart the poll_snr task.
60+
* @tuner_cnr: current S/N ratio for the signal carrier
6361
*/
6462
struct vidtv_demod_state {
6563
struct dvb_frontend frontend;

drivers/media/test-drivers/vidtv/vidtv_encoder.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,16 @@ enum musical_notes {
103103
* @encoder_buf_sz: The encoder buffer size, in bytes
104104
* @encoder_buf_offset: Our byte position in the encoder buffer.
105105
* @sample_count: How many samples we have encoded in total.
106+
* @access_units: encoder payload units, used for clock references
106107
* @src_buf: The source of raw data to be encoded, encoder might set a
107108
* default if null.
109+
* @src_buf_sz: size of @src_buf.
108110
* @src_buf_offset: Our position in the source buffer.
109111
* @is_video_encoder: Whether this a video encoder (as opposed to audio)
110112
* @ctx: Encoder-specific state.
111113
* @stream_id: Examples: Audio streams (0xc0-0xdf), Video streams
112114
* (0xe0-0xef).
113-
* @es_id: The TS PID to use for the elementary stream in this encoder.
115+
* @es_pid: The TS PID to use for the elementary stream in this encoder.
114116
* @encode: Prepare enough AUs for the given amount of time.
115117
* @clear: Clear the encoder output.
116118
* @sync: Attempt to synchronize with this encoder.

drivers/media/test-drivers/vidtv/vidtv_mux.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ struct vidtv_mux_timing {
5959
* @pat: The PAT in use by the muxer.
6060
* @pmt_secs: The PMT sections in use by the muxer. One for each program in the PAT.
6161
* @sdt: The SDT in use by the muxer.
62+
* @nit: The NIT in use by the muxer.
6263
* @eit: the EIT in use by the muxer.
6364
*/
6465
struct vidtv_mux_si {
@@ -86,8 +87,10 @@ struct vidtv_mux_pid_ctx {
8687

8788
/**
8889
* struct vidtv_mux - A muxer abstraction loosely based in libavcodec/mpegtsenc.c
89-
* @mux_rate_kbytes_sec: The bit rate for the TS, in kbytes.
90+
* @fe: The frontend structure allocated by the muxer.
91+
* @dev: pointer to struct device.
9092
* @timing: Keeps track of timing related information.
93+
* @mux_rate_kbytes_sec: The bit rate for the TS, in kbytes.
9194
* @pid_ctx: A hash table to keep track of per-PID metadata.
9295
* @on_new_packets_available_cb: A callback to inform of new TS packets ready.
9396
* @mux_buf: A pointer to a buffer for this muxer. TS packets are stored there

drivers/media/test-drivers/vidtv/vidtv_pes.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ struct pes_header_write_args {
113113
* @dest_buf_sz: The size of the dest_buffer
114114
* @pid: The PID to use for the TS packets.
115115
* @continuity_counter: Incremented on every new TS packet.
116-
* @n_pes_h_s_bytes: Padding bytes. Might be used by an encoder if needed, gets
116+
* @wrote_pes_header: Flag to indicate that the PES header was written
117+
* @n_stuffing_bytes: Padding bytes. Might be used by an encoder if needed, gets
117118
* discarded by the decoder.
119+
* @pcr: counter driven by a 27Mhz clock.
118120
*/
119121
struct pes_ts_header_write_args {
120122
void *dest_buf;
@@ -145,6 +147,7 @@ struct pes_ts_header_write_args {
145147
* @dts: DTS value to send.
146148
* @n_pes_h_s_bytes: Padding bytes. Might be used by an encoder if needed, gets
147149
* discarded by the decoder.
150+
* @pcr: counter driven by a 27Mhz clock.
148151
*/
149152
struct pes_write_args {
150153
void *dest_buf;

drivers/media/test-drivers/vidtv/vidtv_psi.h

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ enum vidtv_psi_stream_types {
4343
STREAM_PRIVATE_DATA = 0x06, /* see ISO/IEC 13818-1 2000 p. 48 */
4444
};
4545

46-
/**
46+
/*
4747
* struct vidtv_psi_desc - A generic PSI descriptor type.
4848
* The descriptor length is an 8-bit field specifying the total number of bytes of the data portion
4949
* of the descriptor following the byte defining the value of this field.
@@ -55,7 +55,7 @@ struct vidtv_psi_desc {
5555
u8 data[];
5656
} __packed;
5757

58-
/**
58+
/*
5959
* struct vidtv_psi_desc_service - Service descriptor.
6060
* See ETSI EN 300 468 section 6.2.33.
6161
*/
@@ -71,7 +71,7 @@ struct vidtv_psi_desc_service {
7171
char *service_name;
7272
} __packed;
7373

74-
/**
74+
/*
7575
* struct vidtv_psi_desc_registration - A registration descriptor.
7676
* See ISO/IEC 13818-1 section 2.6.8
7777
*/
@@ -93,7 +93,7 @@ struct vidtv_psi_desc_registration {
9393
u8 additional_identification_info[];
9494
} __packed;
9595

96-
/**
96+
/*
9797
* struct vidtv_psi_desc_network_name - A network name descriptor
9898
* see ETSI EN 300 468 v1.15.1 section 6.2.27
9999
*/
@@ -110,7 +110,7 @@ struct vidtv_psi_desc_service_list_entry {
110110
struct vidtv_psi_desc_service_list_entry *next;
111111
} __packed;
112112

113-
/**
113+
/*
114114
* struct vidtv_psi_desc_service_list - A service list descriptor
115115
* see ETSI EN 300 468 v1.15.1 section 6.2.35
116116
*/
@@ -121,7 +121,7 @@ struct vidtv_psi_desc_service_list {
121121
struct vidtv_psi_desc_service_list_entry *service_list;
122122
} __packed;
123123

124-
/**
124+
/*
125125
* struct vidtv_psi_desc_short_event - A short event descriptor
126126
* see ETSI EN 300 468 v1.15.1 section 6.2.37
127127
*/
@@ -142,7 +142,7 @@ struct vidtv_psi_desc_short_event
142142
char *event_name,
143143
char *text);
144144

145-
/**
145+
/*
146146
* struct vidtv_psi_table_header - A header that is present for all PSI tables.
147147
*/
148148
struct vidtv_psi_table_header {
@@ -158,7 +158,7 @@ struct vidtv_psi_table_header {
158158
u8 last_section; /* last_section_number */
159159
} __packed;
160160

161-
/**
161+
/*
162162
* struct vidtv_psi_table_pat_program - A single program in the PAT
163163
* See ISO/IEC 13818-1 : 2000 p.43
164164
*/
@@ -168,7 +168,7 @@ struct vidtv_psi_table_pat_program {
168168
struct vidtv_psi_table_pat_program *next;
169169
} __packed;
170170

171-
/**
171+
/*
172172
* struct vidtv_psi_table_pat - The Program Allocation Table (PAT)
173173
* See ISO/IEC 13818-1 : 2000 p.43
174174
*/
@@ -179,7 +179,7 @@ struct vidtv_psi_table_pat {
179179
struct vidtv_psi_table_pat_program *program;
180180
} __packed;
181181

182-
/**
182+
/*
183183
* struct vidtv_psi_table_sdt_service - Represents a service in the SDT.
184184
* see ETSI EN 300 468 v1.15.1 section 5.2.3.
185185
*/
@@ -193,7 +193,7 @@ struct vidtv_psi_table_sdt_service {
193193
struct vidtv_psi_table_sdt_service *next;
194194
} __packed;
195195

196-
/**
196+
/*
197197
* struct vidtv_psi_table_sdt - Represents the Service Description Table
198198
* see ETSI EN 300 468 v1.15.1 section 5.2.3.
199199
*/
@@ -205,15 +205,15 @@ struct vidtv_psi_table_sdt {
205205
struct vidtv_psi_table_sdt_service *service;
206206
} __packed;
207207

208-
/**
208+
/*
209209
* enum service_running_status - Status of a SDT service.
210210
* see ETSI EN 300 468 v1.15.1 section 5.2.3 table 6.
211211
*/
212212
enum service_running_status {
213213
RUNNING = 0x4,
214214
};
215215

216-
/**
216+
/*
217217
* enum service_type - The type of a SDT service.
218218
* see ETSI EN 300 468 v1.15.1 section 6.2.33, table 81.
219219
*/
@@ -223,7 +223,7 @@ enum service_type {
223223
DIGITAL_RADIO_SOUND_SERVICE = 0X2,
224224
};
225225

226-
/**
226+
/*
227227
* struct vidtv_psi_table_pmt_stream - A single stream in the PMT.
228228
* See ISO/IEC 13818-1 : 2000 p.46.
229229
*/
@@ -235,7 +235,7 @@ struct vidtv_psi_table_pmt_stream {
235235
struct vidtv_psi_table_pmt_stream *next;
236236
} __packed;
237237

238-
/**
238+
/*
239239
* struct vidtv_psi_table_pmt - The Program Map Table (PMT).
240240
* See ISO/IEC 13818-1 : 2000 p.46.
241241
*/
@@ -477,7 +477,6 @@ struct vidtv_psi_desc *vidtv_psi_desc_clone(struct vidtv_psi_desc *desc);
477477
* vidtv_psi_create_sec_for_each_pat_entry - Create a PMT section for each
478478
* program found in the PAT
479479
* @pat: The PAT to look for programs.
480-
* @s: The stream loop (one or more streams)
481480
* @pcr_pid: packet ID for the PCR to be used for the program described in this
482481
* PMT section
483482
*/
@@ -595,9 +594,11 @@ u32 vidtv_psi_sdt_write_into(struct vidtv_psi_sdt_write_args *args);
595594
* @buf: The destination buffer.
596595
* @offset: The offset into the destination buffer.
597596
* @pmt: A pointer to the PMT.
597+
* @pid: Program ID
598598
* @buf_sz: The size of the destination buffer.
599599
* @continuity_counter: A pointer to the CC. Incremented on every new packet.
600-
*
600+
* @pcr_pid: The TS PID used for the PSI packets. All channels will share the
601+
* same PCR.
601602
*/
602603
struct vidtv_psi_pmt_write_args {
603604
char *buf;
@@ -713,7 +714,7 @@ u32 vidtv_psi_nit_write_into(struct vidtv_psi_nit_write_args *args);
713714

714715
void vidtv_psi_nit_table_destroy(struct vidtv_psi_table_nit *nit);
715716

716-
/**
717+
/*
717718
* struct vidtv_psi_desc_short_event - A short event descriptor
718719
* see ETSI EN 300 468 v1.15.1 section 6.2.37
719720
*/
@@ -748,7 +749,7 @@ struct vidtv_psi_table_eit
748749
* struct vidtv_psi_eit_write_args - Arguments for writing an EIT section
749750
* @buf: The destination buffer.
750751
* @offset: The offset into the destination buffer.
751-
* @nit: A pointer to the NIT
752+
* @eit: A pointer to the EIT
752753
* @buf_sz: The size of the destination buffer.
753754
* @continuity_counter: A pointer to the CC. Incremented on every new packet.
754755
*

drivers/media/test-drivers/vidtv/vidtv_s302m.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
* @enc: A pointer to the containing encoder structure.
3434
* @frame_index: The current frame in a block
3535
* @au_count: The total number of access units encoded up to now
36+
* @last_duration: Duration of the tone currently being played
37+
* @note_offset: Position at the music tone array
38+
* @last_tone: Tone currently being played
3639
*/
3740
struct vidtv_s302m_ctx {
3841
struct vidtv_encoder *enc;
@@ -43,7 +46,7 @@ struct vidtv_s302m_ctx {
4346
enum musical_notes last_tone;
4447
};
4548

46-
/**
49+
/*
4750
* struct vidtv_smpte_s302m_es - s302m MPEG Elementary Stream header.
4851
*
4952
* See SMPTE 302M 2007 table 1.

drivers/media/test-drivers/vidtv/vidtv_ts.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct vidtv_mpeg_ts {
5353
* @dest_offset: The byte offset into the buffer.
5454
* @pid: The TS PID for the PCR packets.
5555
* @buf_sz: The size of the buffer in bytes.
56-
* @countinuity_counter: The TS continuity_counter.
56+
* @continuity_counter: The TS continuity_counter.
5757
* @pcr: A sample from the system clock.
5858
*/
5959
struct pcr_write_args {
@@ -70,7 +70,7 @@ struct pcr_write_args {
7070
* @dest_buf: The buffer to write into.
7171
* @dest_offset: The byte offset into the buffer.
7272
* @buf_sz: The size of the buffer in bytes.
73-
* @countinuity_counter: The TS continuity_counter.
73+
* @continuity_counter: The TS continuity_counter.
7474
*/
7575
struct null_packet_write_args {
7676
void *dest_buf;

0 commit comments

Comments
 (0)