aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRicardo Biehl Pasquali <pasqualirb@gmail.com>2019-01-25 17:42:56 -0200
committerRicardo Biehl Pasquali <pasqualirb@gmail.com>2019-04-12 14:48:16 -0300
commit7e2581e1df7b56f14c3254c3aa6ef9b536c3e38f (patch)
tree1696989ef65b9e8ed5120df595da1ee4ebc850c8 /src
parent8752514eaf1e530e9fa8db4dda51ce80b775f001 (diff)
pcm: Remove setting unnecessary parameters
SUBFORMAT is always zero. SAMPLE_BITS and FRAME_BITS are refined by ALSA based on the already set FORMAT and CHANNELS. Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/pcm.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/pcm.c b/src/pcm.c
index 3a9deec..4710862 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -359,13 +359,7 @@ int pcm_set_config(struct pcm *pcm, const struct pcm_config *config)
param_init(&params);
param_set_mask(&params, SNDRV_PCM_HW_PARAM_FORMAT,
pcm_format_to_alsa(config->format));
- param_set_mask(&params, SNDRV_PCM_HW_PARAM_SUBFORMAT,
- SNDRV_PCM_SUBFORMAT_STD);
param_set_min(&params, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, config->period_size);
- param_set_int(&params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
- pcm_format_to_bits(config->format));
- param_set_int(&params, SNDRV_PCM_HW_PARAM_FRAME_BITS,
- pcm_format_to_bits(config->format) * config->channels);
param_set_int(&params, SNDRV_PCM_HW_PARAM_CHANNELS,
config->channels);
param_set_int(&params, SNDRV_PCM_HW_PARAM_PERIODS, config->period_count);