Check that byte order is native only if we're using more than one

byte per sample, check the samples are lsb-aligned only if there's
padding.
This commit is contained in:
Alexandre Ratchov 2016-01-29 17:20:34 +01:00
parent 74bbedaf28
commit d6bc5ae04f
1 changed files with 2 additions and 2 deletions

View File

@ -625,8 +625,8 @@ dev_open(char *dev, int mode, int bufsz, char *port)
}
if (par.bits != ADATA_BITS ||
par.bps != sizeof(adata_t) ||
par.le != SIO_LE_NATIVE ||
(par.bps != SIO_BPS(par.bits) && par.msb)) {
(par.bps > 1 && par.le != SIO_LE_NATIVE) ||
(par.bps * 8 > par.bits && par.msb)) {
log_puts(dev_name);
log_puts(": unsupported audio params\n");
return 0;