Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1014017: soundmodem: Fails to build with HID support <linux/hidraw.h>

42 views
Skip to first unread message

Alan Crosswell

unread,
Jun 28, 2022, 3:50:03 PM6/28/22
to
Package: soundmodem
Version: 0.20-6.5
Severity: normal
Tags: patch
X-Debbugs-Cc: n2...@weca.org

Dear Maintainer,

I tried to configure soundmodem to use a CM119B-based USB sound device which
is embedded in a DINAH kit: https://hamprojects.info/dinah/ which uses one of the
HID pins for PTT. soundmodemconfig failed to open /dev/hidraw0.

Upon reading the code I discovered two issues:

1. HAVE_LINUX_HIDRAW_H was not #defined.
2. The test for C-Media controller product IDs only went up to 0x0008 while the
version of the CM119B is 0x0012.

The fix is in the attached patch file and has also been submitted upstream:

https://gitlab.com/tsailer/soundmodem/-/merge_requests/3

1. Fixes configure.ac to look for <linux/hidraw.h>
2. Extends the test for the controller product ID.

The altered soundmodem.conf file demonstrates the settings with gpio="2" for CM119B
signal GPI03.

-- System Information:
Debian Release: 11.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-11-amd64 (SMP w/2 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages soundmodem depends on:
ii libasound2 1.2.4-1.1
ii libatk1.0-0 2.36.0-2
ii libaudiofile1 0.3.6-5
ii libc6 2.31-13+deb11u2
ii libgdk-pixbuf-2.0-0 2.42.2+dfsg-1
ii libglib2.0-0 2.66.8-1
ii libgtk2.0-0 2.24.33-2
ii libhamlib4 4.0-7
ii libpango-1.0-0 1.46.2-3
ii libxml2 2.9.10+dfsg-6.7+deb11u2

soundmodem recommends no packages.

soundmodem suggests no packages.

-- Configuration Files:
/etc/ax25/soundmodem.conf changed:
<?xml version="1.0"?>
<modem>
<configuration name="sm0">
<chaccess txdelay="150" slottime="100" ppersist="40" fulldup="0" txtail="10"/>
<audio type="alsa" device="plughw:1,0" halfdup="0" capturechannelmode="Mono"/>
<ptt file="/dev/hidraw0" hamlib_model="" hamlib_params="" gpio="2"/>
<channel name="Channel 0">
<mod mode="afsk" bps="1200" f0="1200" f1="2200" diffenc="1"/>
<demod mode="afsk" bps="1200" f0="1200" f1="2200" diffdec="1"/>
<pkt mode="MKISS" ifname="sm0" hwaddr="" ip="10.0.0.1" netmask="255.255.255.0" broadcast="10.0.0.255"/>
</channel>
</configuration>
</modem>


-- no debconf information
hid.patch

Daniele Forsi

unread,
Oct 23, 2022, 3:20:04 PM10/23/22
to
Hello Alan,

I committed your patch to configure.ac in a branch and I think that we
should merge it to master:
https://salsa.debian.org/debian-hamradio-team/soundmodem/-/tree/hidraw

I didn't commit your patch to ptt.c yet.
What happens if we drop the check for hiddevinfo.product for C-Media entirely?

You changed the test to work with your hardware, which is fine, but it
seems that there are many more CM108s out there (I have one with ID
0d8c:013c).
I'm copying the list from https://usb-ids.gowdy.us/read/UD/0d8c so it
is archived with this bug report.

Id Name
0001 Audio Device
0002 Composite Device
0003 Sound Device
0004 CM6631A Audio Processor
0005 Blue Snowball
0006 Storm HP-USB500 5.1 Headset
000c Audio Adapter
000d Composite Device
000e Audio Adapter (Planet UP-100, Genius G-Talk)
0012
0014 Audio Adapter (Unitek Y-247A)
001f CM108 Audio Controller
0029
0102 CM106 Like Sound Device
0103 CM102-A+/102S+ Audio Controller
0104 CM103+ Audio Controller
0105 CM108 Audio Controller
0107 CM108 Audio Controller
010f CM108 Audio Controller
0115 CM108 Audio Controller
0134
0139 Multimedia Headset [Gigaware by Ignition L.P.]
013c CM108 Audio Controller
0201 CM6501
5000 Mass Storage Controller
5200 Mass Storage Controller(0D8C,5200)
b213 USB Phone CM109 (aka CT2000,VPT1000)

--
73 de IU5HKX Daniele

Alan Crosswell

unread,
Oct 24, 2022, 9:20:04 AM10/24/22
to
Yeah I don't know that ignoring the device code would be much of a problem. It's not like it searches available devices to see which one to use; the specific device to use is specified.

Alan Crosswell

unread,
Nov 2, 2023, 10:50:05 AM11/2/23
to
Hey Daniele,

It's been about a year and I've just now gotten around to building a Raspberry Pi connected to a DINAH and can confirm that this PTT patch still works on the latest Raspi Bullseye distro. I don't know if there's any interest in carrying this forward to a committed patch for soundmodem. I can always keep patching it myself if I'm the only one who still thinks soundmodem is a nice small tool for AX.25.

Regarding many more CM108's, I wonder how many of them are integrated such that a spare GPIO pin is used for PTT? Given it's probably not a lot, I wouldn't think removing the device test entirely would be a huge issue. Would you like me to submit a revised PR to do that?

73 de N2YGK

Alan Crosswell

unread,
Nov 2, 2023, 5:30:05 PM11/2/23
to
Dave: This patch would be mostly invisible to existing users. It would add the gpio attribute to the soundmodem configuration with a default empty value. 

73

On Thu, Nov 2, 2023 at 11:25 AM Dave Hibberd <d...@vehibberd.com> wrote:
Hi Alan,

I'm part of quite an active packet communtiy (https://ukpacketradio.network/) - DINAH looks like a cool item a number of folks would be itnerested in! Not many of our users are on soundmodem - direwolf, G8BPQ's QtSoundmodem (which I plan to upload to Debian) and (in hardware) NinoTNC are the flavour of the month for us.

I know of a few CM108 mods (our sister communtiy even has a guide - https://wiki.oarc.uk/cm108_sound_interface_smd), so extending functionality to more people would be generally of benefit to all.

Soundmodem is a little old, but it's also not moving very fast so I don't see too much overhead in maintaining a patch for it unless it's likely to degrade the experience for other users?

Cheers

DH

-- 
  Hibby
  MM0RFN
0 new messages