mirror of
https://github.com/ericonr/sndio.git
synced 2024-02-18 04:45:21 -06:00
append _in _out to mic/spkr/hp/... only
This commit is contained in:
parent
99ca91c6b3
commit
0c4e64484d
@ -213,21 +213,25 @@ copy_ch(struct siomix_sun_hdl *hdl,
|
||||
if (icls == -1)
|
||||
return 1;
|
||||
/*
|
||||
* append "-in" and "-out" suffixes, as nowadays
|
||||
* append "_in" and "_out" suffixes, as nowadays
|
||||
* most jacks are bidirectional
|
||||
*/
|
||||
if (strcmp(ostr, "mic") == 0 ||
|
||||
strcmp(ostr, "spkr") == 0 ||
|
||||
strcmp(ostr, "hp") == 0 ||
|
||||
strcmp(ostr, "line") == 0) {
|
||||
if (icls == hdl->iclass)
|
||||
strlcat(ostr, "-in", SIOMIX_NAMEMAX);
|
||||
strlcat(ostr, "_in", SIOMIX_NAMEMAX);
|
||||
if (icls == hdl->oclass)
|
||||
strlcat(ostr, "-out", SIOMIX_NAMEMAX);
|
||||
strlcat(ostr, "_out", SIOMIX_NAMEMAX);
|
||||
}
|
||||
|
||||
/*
|
||||
* record class may conflict with input/output
|
||||
*/
|
||||
if (icls == hdl->rclass) {
|
||||
if (strcmp(ostr, "volume") == 0)
|
||||
strlcpy(ostr, "rec", SIOMIX_NAMEMAX);
|
||||
else
|
||||
strlcat(ostr, "-rec", SIOMIX_NAMEMAX);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user