[pulseaudio-discuss] [PATCH 2/2] alsa-mixer: refactor element_probe
Tanu Kaskinen
tanuk at iki.fi
Mon Mar 7 09:57:25 UTC 2016
Thanks, this is very good refactoring. Just two remarks below:
On Tue, 2016-03-01 at 11:41 +0100, David Henningsson wrote:
> +static int element_ask_vol_dB(snd_mixer_elem_t *me, int dir, long value, long *dBvalue) {
Shouldn't the dir type be pa_alsa_direction_t?
> + } else if (e->n_channels > 2) {
> + /* FIXME: In some places code like this is used:
> + *
> + * e->masks[alsa_channel_ids[p]][e->n_channels-1]
> + *
> + * The definition of e->masks is
> + *
> + * pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST + 1][2];
> + *
> + * Since the array size is fixed at 2, we obviously
> + * don't support elements with more than two
> + * channels... */
> + pa_log_warn("Volume element %s has %u channels. That's too much! I can't handle that!", e->alsa_name, e->n_channels);
> + e->n_channels = 2;
As I mentioned earlier, this assignment can be dropped.
--
Tanu
More information about the pulseaudio-discuss
mailing list