]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: oss: Simplify plugin frame size calculations
authorTakashi Iwai <tiwai@suse.de>
Mon, 9 Mar 2020 18:58:55 +0000 (19:58 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 9 Mar 2020 19:02:42 +0000 (20:02 +0100)
commit3bbf9e2f8624432d1f436bf13ddce1cf9db5238d
tree334dd9b3782e5d7094f4a0f6303417f295ccc5cf
parentcf4afed90c1f926d12277213b54d830c839a1bda
ALSA: pcm: oss: Simplify plugin frame size calculations

Both snd_pcm_plug_client_size() and snd_pcm_plug_slave_size() do the
almost same calculations of calling src_frames() and dst_frames() in
the chain, but just to the different directions with each other.

This patch simplifies those functions.  Now they return -EINVAL for
the invalid direction, but practically seen, there is no functional
changes at all.

Link: https://lore.kernel.org/r/20200309185855.15693-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/pcm_plugin.c