Skip to content

Annoyance Bug in CM108 PTT sanity check when USB VID:PID is not a C-Media device #448

Closed
@skuep

Description

@skuep

I know this should never happen, because there are only C-Media devices out there that can be used with the CM108 PTT option.

Not anymore! The AIOC now has preliminary CM108 support. See this Release: https://github.com/skuep/AIOC/releases/tag/v1.2.0-rc.1

It works quite well! However these two warnings are reported by direwolf.

    Warning: USB audio card 5 (AllInOneCable) is not a device known to work with GPIO PTT.
    ....
    ioctl HIDIOCGRAWINFO failed for /dev/hidraw13. errno = 0.

The first one is fine for me. The second one (repeats with every assertion/deassertion of the PTT) however seems to be a bug with jumbled up if/else clauses here:

direwolf/src/cm108.c

Lines 817 to 829 in 7d3c1d1

#if 1
n = ioctl(fd, HIDIOCGRAWINFO, &info);
if (n == 0) {
if ( ! GOOD_DEVICE(info.vendor, info.product)) {
text_color_set(DW_COLOR_ERROR);
dw_printf ("ioctl HIDIOCGRAWINFO failed for %s. errno = %d.\n", name, errno);
}
}
else {
text_color_set(DW_COLOR_ERROR);
dw_printf ("%s is not a supported device type. Proceed at your own risk. vid=%04x pid=%04x\n", name, info.vendor, info.product);
}
#endif

I would expect the second warning to be

    USB audio card 5 (AllInOneCable) is not a supported device type.  Proceed at your own risk. ....

This warning seems annoying and redundant (it already says so on direwolf startup), it clutters the direwolf log window. Maybe get rid of this message?

Thanks for all the work that went into direwolf. Thanks a bunch!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions