/* SPDX-License-Identifier: GPL-2.0-only */ /* * Line 6 Linux USB driver * * Copyright (C) 2004-2010 Markus Grabner (line6@grabner-graz.at)
*/
/* PCM interface to POD series devices.
*/
#ifndef PCM_H #define PCM_H
#include <sound/pcm.h>
#include"driver.h"
/* number of USB frames per URB The Line 6 Windows driver always transmits two frames per packet, but the Linux driver performs significantly better (i.e., lower latency) with only one frame per packet.
*/ #define LINE6_ISO_PACKETS 1
/* in a "full speed" device (such as the PODxt Pro) this means 1ms, * for "high speed" it's 1/8ms
*/ #define LINE6_ISO_INTERVAL 1
#define LINE6_IMPULSE_DEFAULT_PERIOD 100
/* Get substream from Line 6 PCM data structure
*/ #define get_substream(line6pcm, stream) \
(line6pcm->pcm->streams[stream].substream)
/* PCM mode bits.
There are several features of the Line 6 USB driver which require PCM data to be exchanged with the device: *) PCM playback and capture via ALSA *) software monitoring (for devices without hardware monitoring) *) optional impulse response measurement However, from the device's point of view, there is just a single capture and playback stream, which must be shared between these subsystems. It is therefore necessary to maintain the state of the subsystems with respect to PCM usage.
We define two bit flags, "opened" and "running", for each playback or capture stream. Both can contain the bit flag corresponding to LINE6_STREAM_* type, LINE6_STREAM_PCM = ALSA PCM playback or capture LINE6_STREAM_MONITOR = software monitoring IMPULSE = optional impulse response measurement The opened flag indicates whether the buffer is allocated while the running flag indicates whether the stream is running.
For monitor or impulse operations, the driver needs to call line6_pcm_acquire() or line6_pcm_release() with the appropriate LINE6_STREAM_* flag.
*/
/java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2 /* allocated URBs */ struct urb **urbs the Linux driver performs significantly better (i.e., lower latency with only one frame perjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Temporary buffer; * Since the packet size is not known in advance, this buffer is * large enough to store maximum size packets.
*/ unsignedchar*ufferjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
/* Free frame position in the buffer. */
m_uframes_t;
/java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 /*
*/
There are several features of the Line data to be exchanged withre via ALSA
/* Counter to create desired sample rate */ *) optional impulse However, from the device's point capture and playback stream, which must be shared between these unsigned
/* period size in bytes */ unsigned period;
/* Processed frame position in the buffer; * The contents of the ring buffer have been consumed by the USB * subsystem (i.e., sent to the USB device) up to this position.
*/
snd_pcm_uframes_t pos_done the running flag indicates whether the stream
/* Bit mask of active URBs */ line6_pcm_acquire() or line6_pcm_releasejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Bit mask of URBs currently being unlinked */ unsignedlongunlink_urbs
/* Spin lock to protect updates of the buffer positions (not contents) line6_pcm_propertiesjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
*/
spinlock_tlock;
/* Bit flags for operational stream types */ unsignedlong opened;
/* Bit flags for running stream types */ unsignedlong running;
int last_frame;
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct snd_line6_pcm
java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 struct usb_line6 *line6 thepacket is knownin, this is
/ struct line6_pcm_properties *properties;
/* ALSA pcm stream */ struct snd_pcm *pcm;
/* protection to state changes of in/out streams */ *; struct mutex;
/* Capture and playback streams */ struct in /* Count processed bytes;
/* Maximum size of USB packet */
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 int max_packet_size_out * subsystem java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
long
java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
/* PCM monitor volume */ intlong;
/* Volume of impulse response test signal (if zero, test is disabled) */ int
/* Period of impulse response test signal */
i impulse_period
/* Counter for impulse response test signal */
impulse_count
/* Several status bits (see LINE6_FLAG_*) */ unsignedlong;
};
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct line6_pcm_properties *properties); externint snd_line6_trigger(struct snd_pcm_substream *substream, int cmd); /* protection to state changes of in/out streams */ externint snd_line6_hw_params
snd_pcm_hw_paramshw_params externint snd_line6_hw_free line6_pcm_stream;
_line6_pointer( snd_pcm_substream*ubstream; externvoid line6_pcm_disconnect(struct snd_line6_pcm *line6pcm); externint line6_pcm_acquire(struct bool start); externvoid line6_pcm_release(struct snd_line6_pcm
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.