mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-06 16:56:00 +00:00
Don't advertize formats we don't yet support
We don't handle the reverse endian formats yet so make sure we don't advertize them.
This commit is contained in:
parent
4f28edd4f7
commit
972e740519
|
@ -808,16 +808,21 @@ static int pipewire_set_hw_constraint(snd_pcm_pipewire_t *pw, int rate,
|
|||
SND_PCM_ACCESS_RW_NONINTERLEAVED
|
||||
};
|
||||
unsigned int format_list[] = {
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
SND_PCM_FORMAT_FLOAT_LE,
|
||||
SND_PCM_FORMAT_FLOAT_BE,
|
||||
SND_PCM_FORMAT_S32_LE,
|
||||
SND_PCM_FORMAT_S32_BE,
|
||||
SND_PCM_FORMAT_S16_LE,
|
||||
SND_PCM_FORMAT_S16_BE,
|
||||
SND_PCM_FORMAT_S24_LE,
|
||||
SND_PCM_FORMAT_S24_3LE,
|
||||
SND_PCM_FORMAT_S24_3BE,
|
||||
SND_PCM_FORMAT_S16_LE,
|
||||
#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||
SND_PCM_FORMAT_FLOAT_BE,
|
||||
SND_PCM_FORMAT_S32_BE,
|
||||
SND_PCM_FORMAT_S24_BE,
|
||||
SND_PCM_FORMAT_S24_3LE,
|
||||
SND_PCM_FORMAT_S24_3BE,
|
||||
SND_PCM_FORMAT_S16_BE,
|
||||
#endif
|
||||
SND_PCM_FORMAT_U8,
|
||||
};
|
||||
int min_rate;
|
||||
|
|
|
@ -373,23 +373,19 @@ static int port_enum_formats(void *object,
|
|||
info.info.raw.format == SPA_AUDIO_FORMAT_F32P ||
|
||||
info.info.raw.format == SPA_AUDIO_FORMAT_F32) {
|
||||
spa_pod_builder_add(builder,
|
||||
SPA_FORMAT_AUDIO_format, SPA_POD_CHOICE_ENUM_Id(18,
|
||||
SPA_FORMAT_AUDIO_format, SPA_POD_CHOICE_ENUM_Id(14,
|
||||
info.info.raw.format,
|
||||
SPA_AUDIO_FORMAT_F32P,
|
||||
SPA_AUDIO_FORMAT_F32,
|
||||
SPA_AUDIO_FORMAT_F32_OE,
|
||||
SPA_AUDIO_FORMAT_S32P,
|
||||
SPA_AUDIO_FORMAT_S32,
|
||||
SPA_AUDIO_FORMAT_S32_OE,
|
||||
SPA_AUDIO_FORMAT_S24_32P,
|
||||
SPA_AUDIO_FORMAT_S24_32,
|
||||
SPA_AUDIO_FORMAT_S24_32_OE,
|
||||
SPA_AUDIO_FORMAT_S24P,
|
||||
SPA_AUDIO_FORMAT_S24,
|
||||
SPA_AUDIO_FORMAT_S24_OE,
|
||||
SPA_AUDIO_FORMAT_S16P,
|
||||
SPA_AUDIO_FORMAT_S16,
|
||||
SPA_AUDIO_FORMAT_S16_OE,
|
||||
SPA_AUDIO_FORMAT_U8P,
|
||||
SPA_AUDIO_FORMAT_U8),
|
||||
0);
|
||||
|
|
|
@ -446,23 +446,19 @@ static int port_enum_formats(void *object,
|
|||
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
|
||||
SPA_FORMAT_mediaType, SPA_POD_Id(SPA_MEDIA_TYPE_audio),
|
||||
SPA_FORMAT_mediaSubtype, SPA_POD_Id(SPA_MEDIA_SUBTYPE_raw),
|
||||
SPA_FORMAT_AUDIO_format, SPA_POD_CHOICE_ENUM_Id(18,
|
||||
SPA_FORMAT_AUDIO_format, SPA_POD_CHOICE_ENUM_Id(14,
|
||||
SPA_AUDIO_FORMAT_F32P,
|
||||
SPA_AUDIO_FORMAT_F32P,
|
||||
SPA_AUDIO_FORMAT_F32,
|
||||
SPA_AUDIO_FORMAT_F32_OE,
|
||||
SPA_AUDIO_FORMAT_S32P,
|
||||
SPA_AUDIO_FORMAT_S32,
|
||||
SPA_AUDIO_FORMAT_S32_OE,
|
||||
SPA_AUDIO_FORMAT_S24_32P,
|
||||
SPA_AUDIO_FORMAT_S24_32,
|
||||
SPA_AUDIO_FORMAT_S24_32_OE,
|
||||
SPA_AUDIO_FORMAT_S24P,
|
||||
SPA_AUDIO_FORMAT_S24,
|
||||
SPA_AUDIO_FORMAT_S24_OE,
|
||||
SPA_AUDIO_FORMAT_S16P,
|
||||
SPA_AUDIO_FORMAT_S16,
|
||||
SPA_AUDIO_FORMAT_S16_OE,
|
||||
SPA_AUDIO_FORMAT_U8,
|
||||
SPA_AUDIO_FORMAT_U8P),
|
||||
SPA_FORMAT_AUDIO_rate, SPA_POD_CHOICE_RANGE_Int(
|
||||
|
|
|
@ -427,23 +427,19 @@ static int port_enum_formats(void *object,
|
|||
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
|
||||
SPA_FORMAT_mediaType, SPA_POD_Id(SPA_MEDIA_TYPE_audio),
|
||||
SPA_FORMAT_mediaSubtype, SPA_POD_Id(SPA_MEDIA_SUBTYPE_raw),
|
||||
SPA_FORMAT_AUDIO_format, SPA_POD_CHOICE_ENUM_Id(18,
|
||||
SPA_FORMAT_AUDIO_format, SPA_POD_CHOICE_ENUM_Id(14,
|
||||
SPA_AUDIO_FORMAT_F32P,
|
||||
SPA_AUDIO_FORMAT_F32P,
|
||||
SPA_AUDIO_FORMAT_F32,
|
||||
SPA_AUDIO_FORMAT_F32_OE,
|
||||
SPA_AUDIO_FORMAT_S32P,
|
||||
SPA_AUDIO_FORMAT_S32,
|
||||
SPA_AUDIO_FORMAT_S32_OE,
|
||||
SPA_AUDIO_FORMAT_S24_32P,
|
||||
SPA_AUDIO_FORMAT_S24_32,
|
||||
SPA_AUDIO_FORMAT_S24_32_OE,
|
||||
SPA_AUDIO_FORMAT_S24P,
|
||||
SPA_AUDIO_FORMAT_S24,
|
||||
SPA_AUDIO_FORMAT_S24_OE,
|
||||
SPA_AUDIO_FORMAT_S16P,
|
||||
SPA_AUDIO_FORMAT_S16,
|
||||
SPA_AUDIO_FORMAT_S16_OE,
|
||||
SPA_AUDIO_FORMAT_U8P,
|
||||
SPA_AUDIO_FORMAT_U8),
|
||||
SPA_FORMAT_AUDIO_rate, SPA_POD_CHOICE_RANGE_Int(
|
||||
|
|
Loading…
Reference in a new issue