mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ALSA: Remove transfer_ack_{begin,end} callbacks from struct snd_pcm_runtime
While there is nothing wrong with the transfer_ack_begin and transfer_ack_end callbacks per-se, the last documented user was part of the alsa-driver 0.5.12a package, which was released 14 years ago and even predates the upstream integration of the ALSA core and has subsequently been superseded by newer alsa-driver releases. This seems to indicate that there is no need for having these callbacks and they are just cruft that can be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> (cherry picked from commit 53e597b1d194910bef53ed0632da329fef497904) Change-Id: Ifa69c873640b171aa1843335b2b3cb856d29bb1a
This commit is contained in:
parent
97b270d974
commit
602366ce81
3 changed files with 2 additions and 26 deletions
|
@ -2221,10 +2221,6 @@ struct _snd_pcm_runtime {
|
||||||
struct snd_pcm_hardware hw;
|
struct snd_pcm_hardware hw;
|
||||||
struct snd_pcm_hw_constraints hw_constraints;
|
struct snd_pcm_hw_constraints hw_constraints;
|
||||||
|
|
||||||
/* -- interrupt callbacks -- */
|
|
||||||
void (*transfer_ack_begin)(struct snd_pcm_substream *substream);
|
|
||||||
void (*transfer_ack_end)(struct snd_pcm_substream *substream);
|
|
||||||
|
|
||||||
/* -- timer -- */
|
/* -- timer -- */
|
||||||
unsigned int timer_resolution; /* timer resolution */
|
unsigned int timer_resolution; /* timer resolution */
|
||||||
|
|
||||||
|
@ -2249,9 +2245,8 @@ struct _snd_pcm_runtime {
|
||||||
For the operators (callbacks) of each sound driver, most of
|
For the operators (callbacks) of each sound driver, most of
|
||||||
these records are supposed to be read-only. Only the PCM
|
these records are supposed to be read-only. Only the PCM
|
||||||
middle-layer changes / updates them. The exceptions are
|
middle-layer changes / updates them. The exceptions are
|
||||||
the hardware description (hw), interrupt callbacks
|
the hardware description (hw) DMA buffer information and the
|
||||||
(transfer_ack_xxx), DMA buffer information, and the private
|
private data. Besides, if you use the standard buffer allocation
|
||||||
data. Besides, if you use the standard buffer allocation
|
|
||||||
method via <function>snd_pcm_lib_malloc_pages()</function>,
|
method via <function>snd_pcm_lib_malloc_pages()</function>,
|
||||||
you don't need to set the DMA buffer information by yourself.
|
you don't need to set the DMA buffer information by yourself.
|
||||||
</para>
|
</para>
|
||||||
|
@ -2578,16 +2573,6 @@ struct _snd_pcm_runtime {
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="pcm-interface-runtime-intr">
|
|
||||||
<title>Interrupt Callbacks</title>
|
|
||||||
<para>
|
|
||||||
The field <structfield>transfer_ack_begin</structfield> and
|
|
||||||
<structfield>transfer_ack_end</structfield> are called at
|
|
||||||
the beginning and at the end of
|
|
||||||
<function>snd_pcm_period_elapsed()</function>, respectively.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="pcm-interface-operators">
|
<section id="pcm-interface-operators">
|
||||||
|
|
|
@ -341,10 +341,6 @@ struct snd_pcm_runtime {
|
||||||
struct snd_pcm_hardware hw;
|
struct snd_pcm_hardware hw;
|
||||||
struct snd_pcm_hw_constraints hw_constraints;
|
struct snd_pcm_hw_constraints hw_constraints;
|
||||||
|
|
||||||
/* -- interrupt callbacks -- */
|
|
||||||
void (*transfer_ack_begin)(struct snd_pcm_substream *substream);
|
|
||||||
void (*transfer_ack_end)(struct snd_pcm_substream *substream);
|
|
||||||
|
|
||||||
/* -- timer -- */
|
/* -- timer -- */
|
||||||
unsigned int timer_resolution; /* timer resolution */
|
unsigned int timer_resolution; /* timer resolution */
|
||||||
int tstamp_type; /* timestamp type */
|
int tstamp_type; /* timestamp type */
|
||||||
|
|
|
@ -1753,9 +1753,6 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)
|
||||||
return;
|
return;
|
||||||
runtime = substream->runtime;
|
runtime = substream->runtime;
|
||||||
|
|
||||||
if (runtime->transfer_ack_begin)
|
|
||||||
runtime->transfer_ack_begin(substream);
|
|
||||||
|
|
||||||
snd_pcm_stream_lock_irqsave(substream, flags);
|
snd_pcm_stream_lock_irqsave(substream, flags);
|
||||||
if (!snd_pcm_running(substream) ||
|
if (!snd_pcm_running(substream) ||
|
||||||
snd_pcm_update_hw_ptr0(substream, 1) < 0)
|
snd_pcm_update_hw_ptr0(substream, 1) < 0)
|
||||||
|
@ -1765,8 +1762,6 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)
|
||||||
snd_timer_interrupt(substream->timer, 1);
|
snd_timer_interrupt(substream->timer, 1);
|
||||||
_end:
|
_end:
|
||||||
snd_pcm_stream_unlock_irqrestore(substream, flags);
|
snd_pcm_stream_unlock_irqrestore(substream, flags);
|
||||||
if (runtime->transfer_ack_end)
|
|
||||||
runtime->transfer_ack_end(substream);
|
|
||||||
kill_fasync(&runtime->fasync, SIGIO, POLL_IN);
|
kill_fasync(&runtime->fasync, SIGIO, POLL_IN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue