mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
pcm: hw: remove superfluous code to call of SNDRV_PCM_IOCTL_SYNC_PTR in snd_pcm_hw_forward()
SNDRV_PCM_IOCTL_SYNC_PTR command was introduced to PCM protocol/interface
in its version 2.0.7, however this command is used in a branch for the
newer version protocol/interface in snd_pcm_hw_forward().
This commit removes the superfluous code as a part of work for code
refactoring.
Fixes: eafb492512 ("- added SYNC_PTR ioctl support for pcm_hw plugin")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
cea81cbdc2
commit
a9ec1a6f68
1 changed files with 0 additions and 13 deletions
|
|
@ -144,13 +144,6 @@ static int sync_ptr1(snd_pcm_hw_t *hw, unsigned int flags)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int sync_ptr(snd_pcm_hw_t *hw, unsigned int flags)
|
||||
{
|
||||
if (hw->mmap_status_fallbacked || hw->mmap_control_fallbacked)
|
||||
return sync_ptr1(hw, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int issue_avail_min(snd_pcm_hw_t *hw)
|
||||
{
|
||||
if (!hw->mmap_control_fallbacked)
|
||||
|
|
@ -777,9 +770,6 @@ static snd_pcm_sframes_t snd_pcm_hw_forward(snd_pcm_t *pcm, snd_pcm_uframes_t fr
|
|||
} else {
|
||||
snd_pcm_sframes_t avail;
|
||||
|
||||
err = sync_ptr(hw, SNDRV_PCM_SYNC_PTR_HWSYNC);
|
||||
if (err < 0)
|
||||
return err;
|
||||
switch (FAST_PCM_STATE(hw)) {
|
||||
case SNDRV_PCM_STATE_RUNNING:
|
||||
case SNDRV_PCM_STATE_DRAINING:
|
||||
|
|
@ -797,9 +787,6 @@ static snd_pcm_sframes_t snd_pcm_hw_forward(snd_pcm_t *pcm, snd_pcm_uframes_t fr
|
|||
if (frames > (snd_pcm_uframes_t)avail)
|
||||
frames = avail;
|
||||
snd_pcm_mmap_appl_forward(pcm, frames);
|
||||
err = sync_ptr(hw, 0);
|
||||
if (err < 0)
|
||||
return err;
|
||||
return frames;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue