mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-15 15:06:42 +00:00
On record only devices, don't fail if we don't have a play channel.
MFC after: 3 days
This commit is contained in:
parent
5c83bb4912
commit
0224b85a14
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145180
@ -78,9 +78,17 @@ ua_chan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *
|
||||
pa_dev = device_get_parent(sc->sc_dev);
|
||||
/* Create ua_playfmt[] & ua_recfmt[] */
|
||||
uaudio_query_formats(pa_dev, (u_int32_t *)&ua_playfmt, (u_int32_t *)&ua_recfmt);
|
||||
if (ua_playfmt[0] == 0) {
|
||||
printf("%s channel supported format list invalid\n", dir == PCMDIR_PLAY? "play" : "record");
|
||||
return NULL;
|
||||
if (dir == PCMDIR_PLAY) {
|
||||
if (ua_playfmt[0] == 0) {
|
||||
printf("play channel supported format list invalid\n");
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
if (ua_recfmt[0] == 0) {
|
||||
printf("record channel supported format list invalid\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* allocate PCM side DMA buffer */
|
||||
|
Loading…
Reference in New Issue
Block a user