···484484- Updating the error statistics accordingly (e.g. BER, etc).485485486486- Simulating some noise in the encoded data.487487+488488+Functions and structs used within vidtv489489+---------------------------------------490490+491491+.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_bridge.h492492+493493+.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_channel.h494494+495495+.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_demod.h496496+497497+.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_encoder.h498498+499499+.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_mux.h500500+501501+.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_pes.h502502+503503+.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_psi.h504504+505505+.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_s302m.h506506+507507+.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_ts.h508508+509509+.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_tuner.h510510+511511+.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_common.c512512+513513+.. kernel-doc:: drivers/media/test-drivers/vidtv/vidtv_tuner.c
+1-1
drivers/media/test-drivers/vidtv/vidtv_bridge.h
···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.3737- * @dmx_frontend: The frontends associated with the demux.3737+ * @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.
+1
drivers/media/test-drivers/vidtv/vidtv_channel.h
···3939 * Every stream will have its corresponding encoder polled to produce TS packets4040 * These packets may be interleaved by the mux and then delivered to the bridge4141 *4242+ * @name: name of the channel4243 * @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.
+4-6
drivers/media/test-drivers/vidtv/vidtv_demod.h
···2020 * modulation and fec_inner2121 * @modulation: see enum fe_modulation2222 * @fec: see enum fe_fec_rate2323+ * @cnr_ok: S/N threshold to consider the signal as OK. Below that, there's2424+ * a chance of losing sync.2525+ * @cnr_good: S/N threshold to consider the signal strong.2326 *2427 * This struct matches values for 'good' and 'ok' CNRs given the combination2528 * of modulation and fec_inner in use. We might simulate some noise if the···5653 * struct vidtv_demod_state - The demodulator state5754 * @frontend: The frontend structure allocated by the demod.5855 * @config: The config used to init the demod.5959- * @poll_snr: The task responsible for periodically checking the simulated6060- * signal quality, eventually dropping or reacquiring the TS lock.6156 * @status: the demod status.6262- * @cold_start: Whether the demod has not been init yet.6363- * @poll_snr_thread_running: Whether the task responsible for periodically6464- * checking the simulated signal quality is running.6565- * @poll_snr_thread_restart: Whether we should restart the poll_snr task.5757+ * @tuner_cnr: current S/N ratio for the signal carrier6658 */6759struct vidtv_demod_state {6860 struct dvb_frontend frontend;
+3-1
drivers/media/test-drivers/vidtv/vidtv_encoder.h
···103103 * @encoder_buf_sz: The encoder buffer size, in bytes104104 * @encoder_buf_offset: Our byte position in the encoder buffer.105105 * @sample_count: How many samples we have encoded in total.106106+ * @access_units: encoder payload units, used for clock references106107 * @src_buf: The source of raw data to be encoded, encoder might set a107108 * default if null.109109+ * @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 streams112114 * (0xe0-0xef).113113- * @es_id: The TS PID to use for the elementary stream in this encoder.115115+ * @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.
+4-1
drivers/media/test-drivers/vidtv/vidtv_mux.h
···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.6262+ * @nit: The NIT in use by the muxer.6263 * @eit: the EIT in use by the muxer.6364 */6465struct vidtv_mux_si {···87868887/**8988 * struct vidtv_mux - A muxer abstraction loosely based in libavcodec/mpegtsenc.c9090- * @mux_rate_kbytes_sec: The bit rate for the TS, in kbytes.8989+ * @fe: The frontend structure allocated by the muxer.9090+ * @dev: pointer to struct device.9191 * @timing: Keeps track of timing related information.9292+ * @mux_rate_kbytes_sec: The bit rate for the TS, in kbytes.9293 * @pid_ctx: A hash table to keep track of per-PID metadata.9394 * @on_new_packets_available_cb: A callback to inform of new TS packets ready.9495 * @mux_buf: A pointer to a buffer for this muxer. TS packets are stored there
+4-1
drivers/media/test-drivers/vidtv/vidtv_pes.h
···113113 * @dest_buf_sz: The size of the dest_buffer114114 * @pid: The PID to use for the TS packets.115115 * @continuity_counter: Incremented on every new TS packet.116116- * @n_pes_h_s_bytes: Padding bytes. Might be used by an encoder if needed, gets116116+ * @wrote_pes_header: Flag to indicate that the PES header was written117117+ * @n_stuffing_bytes: Padding bytes. Might be used by an encoder if needed, gets117118 * discarded by the decoder.119119+ * @pcr: counter driven by a 27Mhz clock.118120 */119121struct pes_ts_header_write_args {120122 void *dest_buf;···147145 * @dts: DTS value to send.148146 * @n_pes_h_s_bytes: Padding bytes. Might be used by an encoder if needed, gets149147 * discarded by the decoder.148148+ * @pcr: counter driven by a 27Mhz clock.150149 */151150struct pes_write_args {152151 void *dest_buf;
+20-19
drivers/media/test-drivers/vidtv/vidtv_psi.h
···4343 STREAM_PRIVATE_DATA = 0x06, /* see ISO/IEC 13818-1 2000 p. 48 */4444};45454646-/**4646+/*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 portion4949 * of the descriptor following the byte defining the value of this field.···5555 u8 data[];5656} __packed;57575858-/**5858+/*5959 * struct vidtv_psi_desc_service - Service descriptor.6060 * See ETSI EN 300 468 section 6.2.33.6161 */···7171 char *service_name;7272} __packed;73737474-/**7474+/*7575 * struct vidtv_psi_desc_registration - A registration descriptor.7676 * See ISO/IEC 13818-1 section 2.6.87777 */···9393 u8 additional_identification_info[];9494} __packed;95959696-/**9696+/*9797 * struct vidtv_psi_desc_network_name - A network name descriptor9898 * see ETSI EN 300 468 v1.15.1 section 6.2.279999 */···110110 struct vidtv_psi_desc_service_list_entry *next;111111} __packed;112112113113-/**113113+/*114114 * struct vidtv_psi_desc_service_list - A service list descriptor115115 * see ETSI EN 300 468 v1.15.1 section 6.2.35116116 */···121121 struct vidtv_psi_desc_service_list_entry *service_list;122122} __packed;123123124124-/**124124+/*125125 * struct vidtv_psi_desc_short_event - A short event descriptor126126 * see ETSI EN 300 468 v1.15.1 section 6.2.37127127 */···142142 char *event_name,143143 char *text);144144145145-/**145145+/*146146 * struct vidtv_psi_table_header - A header that is present for all PSI tables.147147 */148148struct vidtv_psi_table_header {···158158 u8 last_section; /* last_section_number */159159} __packed;160160161161-/**161161+/*162162 * struct vidtv_psi_table_pat_program - A single program in the PAT163163 * See ISO/IEC 13818-1 : 2000 p.43164164 */···168168 struct vidtv_psi_table_pat_program *next;169169} __packed;170170171171-/**171171+/*172172 * struct vidtv_psi_table_pat - The Program Allocation Table (PAT)173173 * See ISO/IEC 13818-1 : 2000 p.43174174 */···179179 struct vidtv_psi_table_pat_program *program;180180} __packed;181181182182-/**182182+/*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 */···193193 struct vidtv_psi_table_sdt_service *next;194194} __packed;195195196196-/**196196+/*197197 * struct vidtv_psi_table_sdt - Represents the Service Description Table198198 * see ETSI EN 300 468 v1.15.1 section 5.2.3.199199 */···205205 struct vidtv_psi_table_sdt_service *service;206206} __packed;207207208208-/**208208+/*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 */···213213 RUNNING = 0x4,214214};215215216216-/**216216+/*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 */···223223 DIGITAL_RADIO_SOUND_SERVICE = 0X2,224224};225225226226-/**226226+/*227227 * struct vidtv_psi_table_pmt_stream - A single stream in the PMT.228228 * See ISO/IEC 13818-1 : 2000 p.46.229229 */···235235 struct vidtv_psi_table_pmt_stream *next;236236} __packed;237237238238-/**238238+/*239239 * struct vidtv_psi_table_pmt - The Program Map Table (PMT).240240 * See ISO/IEC 13818-1 : 2000 p.46.241241 */···477477 * vidtv_psi_create_sec_for_each_pat_entry - Create a PMT section for each478478 * program found in the PAT479479 * @pat: The PAT to look for programs.480480- * @s: The stream loop (one or more streams)481480 * @pcr_pid: packet ID for the PCR to be used for the program described in this482481 * PMT section483482 */···594595 * @buf: The destination buffer.595596 * @offset: The offset into the destination buffer.596597 * @pmt: A pointer to the PMT.598598+ * @pid: Program ID597599 * @buf_sz: The size of the destination buffer.598600 * @continuity_counter: A pointer to the CC. Incremented on every new packet.599599- *601601+ * @pcr_pid: The TS PID used for the PSI packets. All channels will share the602602+ * same PCR.600603 */601604struct vidtv_psi_pmt_write_args {602605 char *buf;···714713715714void vidtv_psi_nit_table_destroy(struct vidtv_psi_table_nit *nit);716715717717-/**716716+/*718717 * struct vidtv_psi_desc_short_event - A short event descriptor719718 * see ETSI EN 300 468 v1.15.1 section 6.2.37720719 */···749748 * struct vidtv_psi_eit_write_args - Arguments for writing an EIT section750749 * @buf: The destination buffer.751750 * @offset: The offset into the destination buffer.752752- * @nit: A pointer to the NIT751751+ * @eit: A pointer to the EIT753752 * @buf_sz: The size of the destination buffer.754753 * @continuity_counter: A pointer to the CC. Incremented on every new packet.755754 *
+4-1
drivers/media/test-drivers/vidtv/vidtv_s302m.h
···3333 * @enc: A pointer to the containing encoder structure.3434 * @frame_index: The current frame in a block3535 * @au_count: The total number of access units encoded up to now3636+ * @last_duration: Duration of the tone currently being played3737+ * @note_offset: Position at the music tone array3838+ * @last_tone: Tone currently being played3639 */3740struct vidtv_s302m_ctx {3841 struct vidtv_encoder *enc;···4643 enum musical_notes last_tone;4744};48454949-/**4646+/*5047 * struct vidtv_smpte_s302m_es - s302m MPEG Elementary Stream header.5148 *5249 * See SMPTE 302M 2007 table 1.
+2-2
drivers/media/test-drivers/vidtv/vidtv_ts.h
···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.5656- * @countinuity_counter: The TS continuity_counter.5656+ * @continuity_counter: The TS continuity_counter.5757 * @pcr: A sample from the system clock.5858 */5959struct 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.7373- * @countinuity_counter: The TS continuity_counter.7373+ * @continuity_counter: The TS continuity_counter.7474 */7575struct null_packet_write_args {7676 void *dest_buf;