Bug#1014017: soundmodem: Fails to build with HID support

2023-11-02 Thread Alan Crosswell
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  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
>
> On Thu, 2 Nov 2023, at 2:45 PM, Alan Crosswell wrote:
>
> 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
>
> On Mon, 24 Oct 2022 09:14:23 -0400 Alan Crosswell  wrote:
> > 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.
> >
> > On Sun, Oct 23, 2022 at 3:10 PM Daniele Forsi  wrote:
> >
> > > 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
> > >
>
>
>


Bug#1014017: soundmodem: Fails to build with HID support

2023-11-02 Thread Dave Hibberd
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

On Thu, 2 Nov 2023, at 2:45 PM, Alan Crosswell wrote:
> 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
> 
> On Mon, 24 Oct 2022 09:14:23 -0400 Alan Crosswell  wrote:
> > 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.
> > 
> > On Sun, Oct 23, 2022 at 3:10 PM Daniele Forsi  wrote:
> > 
> > > 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
> > >


Bug#1014017: soundmodem: Fails to build with HID support

2023-11-02 Thread Alan Crosswell
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

On Mon, 24 Oct 2022 09:14:23 -0400 Alan Crosswell  wrote:
> 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.
>
> On Sun, Oct 23, 2022 at 3:10 PM Daniele Forsi  wrote:
>
> > 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
> >


Bug#1014017: soundmodem: Fails to build with HID support

2022-10-24 Thread Alan Crosswell
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.

On Sun, Oct 23, 2022 at 3:10 PM Daniele Forsi  wrote:

> 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
>


Bug#1014017: soundmodem: Fails to build with HID support

2022-10-23 Thread Daniele Forsi
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



Bug#1014017: soundmodem: Fails to build with HID support

2022-06-28 Thread Alan Crosswell
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 
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  libaudiofile10.3.6-5
ii  libc62.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:


  




  
  
  

  



-- no debconf information
diff --git a/configure.ac b/configure.ac
index b9ccd87..a54600d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,7 +52,7 @@ AC_CHECK_LIB(posix4,sched_setscheduler)
 AC_CHECK_LIB(uuid,GUID_NULL)
 AC_CHECK_FUNCS(getopt_long,,[AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1])])
 AC_CHECK_HEADERS(sys/audioio.h stropts.h sys/conf.h sys/soundcard.h 
sys/ioctl.h time.h inttypes.h net/if_arp.h)
-AC_CHECK_HEADERS(pty.h getopt.h syslog.h sched.h linux/sockios.h sys/ioccom.h 
linux/ppdev.h)
+AC_CHECK_HEADERS(pty.h getopt.h syslog.h sched.h linux/sockios.h sys/ioccom.h 
linux/ppdev.h linux/hidraw.h)
 AC_CHECK_HEADERS(sys/socket.h linux/if.h,,,
 [[
 #if HAVE_SYS_SOCKET_H
diff --git a/soundcard/ptt.c b/soundcard/ptt.c
index 1b168e1..377d374 100644
--- a/soundcard/ptt.c
+++ b/soundcard/ptt.c
@@ -271,7 +271,7 @@ int pttinit(struct pttio *state, const char *params[])
  (
(hiddevinfo.vendor == 0x0d8c// CM108/109/119
&& hiddevinfo.product >= 0x0008
-   && hiddevinfo.product <= 0x000f
+   && hiddevinfo.product <= 0x0012
)
||
(hiddevinfo.vendor == 0x0c76 && // SSS1621/23