diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-25 13:11:52 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-25 13:11:52 +0200 |
commit | 346e2e4a8b47089f4319f114ec9ac3a95b5f0ac8 (patch) | |
tree | 0e824d68b72969127abcad85e82b468ed4e23237 /sound/core/pcm_lib.c | |
parent | 5caf6ae5ce880ec15448b310e47a9515ebb7e808 (diff) | |
parent | 4f0eb5d7efe375859b15c97f453113a242bf057b (diff) | |
download | op-kernel-dev-346e2e4a8b47089f4319f114ec9ac3a95b5f0ac8.zip op-kernel-dev-346e2e4a8b47089f4319f114ec9ac3a95b5f0ac8.tar.gz |
Merge tag 'phy-for_3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next
Kishon writes:
Adds 3 new PHY drivers stih407, stih41x and rcar gen2 PHY. It also
includes miscellaneous cleanup of other PHY drivers.
Conflicts:
MAINTAINERS
Diffstat (limited to 'sound/core/pcm_lib.c')
-rw-r--r-- | sound/core/pcm_lib.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 9acc77e..0032278 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -1782,14 +1782,16 @@ static int snd_pcm_lib_ioctl_fifo_size(struct snd_pcm_substream *substream, { struct snd_pcm_hw_params *params = arg; snd_pcm_format_t format; - int channels, width; + int channels; + ssize_t frame_size; params->fifo_size = substream->runtime->hw.fifo_size; if (!(substream->runtime->hw.info & SNDRV_PCM_INFO_FIFO_IN_FRAMES)) { format = params_format(params); channels = params_channels(params); - width = snd_pcm_format_physical_width(format); - params->fifo_size /= width * channels; + frame_size = snd_pcm_format_size(format, channels); + if (frame_size > 0) + params->fifo_size /= (unsigned)frame_size; } return 0; } |