GithubHelp home page GithubHelp logo

alsajsongateway's People

Contributors

fulup-bzh avatar rhofour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alsajsongateway's Issues

key named "value" for mixer controls is type of Array

An example control from my mixer looks like

{
  "numid": 9,
  "name": "Line 03 (Headphones 1 L) Playback Volume",
  "iface": "MIXER",
  "actif": true,
  "value": [
    127
  ],
  "ctrl": {
    "type": "INTEGER",
    "count": 1,
    "min": 0,
    "max": 127,
    "step": 1
  },
  "acl": {
    "read": true,
    "write": true,
    "inact": false,
    "volat": false,
    "lock": false
  },
  "tlv": {
    "dbminmax": {
      "min": "-127.00dB",
      "max": "0.00dB"
    }
  }
}

It seems odd that the numerical value of the control is an Array rather than an Integer. Are there single mixer controls that have more than one value?

Issue with scarlet 18i20 2nd gen

hello,

I just got a scarlet 18i20 2nd GEN and i'm trying to make AlsaJsonGateway working with. I've a working installation with a 1st gen 18i8, and i'm trying to use the same config for the new scarlett but got this error.

Here are some informations :

lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:07dc Intel Corp. 
Bus 001 Device 002: ID 064e:9700 Suyin Corp. Asus Integrated Webcam
Bus 001 Device 004: ID 1235:8201 Focusrite-Novation 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ajg-daemon --rootdir=$AJW_DIR --verbose --port=1234  
AJG:warning: config at /home/daeavelwyn/AJW/sessions/AJG-config.json: No such file or directory
AJG:notice checking session dir [/home/daeavelwyn/AJW/sessions]
AJG:notice Init config done
AJG:notice Foreground mode
AJG:notice Waiting port=1234 rootdir=/home/daeavelwyn/AJW
AJG:notice Browser URL= http://localhost:1234
AJG:notice entering httpd waiting loop
AJG:notice Use Ctrl-C to quitServing: [/home/daeavelwyn/AJW/index.html]
Serving: [/home/daeavelwyn/AJW/mixers/ajg]
Serving: [/home/daeavelwyn/AJW/externals/mm-foundation-tpls.min.js]
Serving: [/home/daeavelwyn/AJW/externals/script.min.js]
Serving: [/home/daeavelwyn/AJW/externals/angular-ui-notification.min.js]
Serving: [/home/daeavelwyn/AJW/mixers/css/common-mixer.css]
Serving: [/home/daeavelwyn/AJW/externals/bzm-range-slider.min.js]
Serving: [/home/daeavelwyn/AJW/externals/bzm-range-slider.css]
Serving: [/home/daeavelwyn/AJW/externals/angular-ui-notification.min.css]
Serving: [/home/daeavelwyn/AJW/mixers/css/scarlett-mixer.css]
Serving: [/home/daeavelwyn/AJW/mixers/js/common-mixer.js]
Serving: [/home/daeavelwyn/AJW/mixers/partials/mixer-connect.html]
1: alsajson GATEWAY_PING
AJG:success [  0]: 1
2: alsajson CARD_GET_ALL
AJG: Soundcard Devid=hw:0  Cardid=Loopback Name=Loopback 1
AJG: Soundcard Devid=hw:1  Cardid=HDMI    Name=HDA Intel HDMI at 0xf7d1c000 irq 45
AJG: Soundcard Devid=hw:2  Cardid=PCH     Name=HDA Intel PCH at 0xf7d18000 irq 44
AJG: Soundcard Devid=hw:3  Cardid=USB     Name=Focusrite Scarlett 18i20 USB at usb-0000:00:14.0-1, high speed
AJG:empty  [  1]: SndCard [hw:4] Not Found
AJG:empty  [  2]: SndCard [hw:5] Not Found
AJG:empty  [  3]: SndCard [hw:6] Not Found
AJG:empty  [  4]: SndCard [hw:7] Not Found
AJG:empty  [  5]: SndCard [hw:8] Not Found
AJG:empty  [  6]: SndCard [hw:9] Not Found
AJG:empty  [  7]: SndCard [hw:10] Not Found
AJG:empty  [  8]: SndCard [hw:11] Not Found
AJG:empty  [  9]: SndCard [hw:12] Not Found
AJG:empty  [ 10]: SndCard [hw:13] Not Found
AJG:empty  [ 11]: SndCard [hw:14] Not Found
AJG:empty  [ 12]: SndCard [hw:15] Not Found
AJG:empty  [ 13]: SndCard [hw:16] Not Found
AJG:empty  [ 14]: SndCard [hw:17] Not Found
AJG:empty  [ 15]: SndCard [hw:18] Not Found
AJG:empty  [ 16]: SndCard [hw:19] Not Found
AJG:empty  [ 17]: SndCard [hw:20] Not Found
AJG:empty  [ 18]: SndCard [hw:21] Not Found
AJG:empty  [ 19]: SndCard [hw:22] Not Found
AJG:empty  [ 20]: SndCard [hw:23] Not Found
AJG:empty  [ 21]: SndCard [hw:24] Not Found
AJG:empty  [ 22]: SndCard [hw:25] Not Found
AJG:empty  [ 23]: SndCard [hw:26] Not Found
AJG:empty  [ 24]: SndCard [hw:27] Not Found
AJG:empty  [ 25]: SndCard [hw:28] Not Found
AJG:empty  [ 26]: SndCard [hw:29] Not Found
AJG:empty  [ 27]: SndCard [hw:30] Not Found
AJG:empty  [ 28]: SndCard [hw:31] Not Found
Serving: [/home/daeavelwyn/AJW/mixers/partials/scarlett-mixer.html]
Serving: [/home/daeavelwyn/AJW/mixers/js/scarlett-mixer.js]
Serving: [/home/daeavelwyn/AJW/mixers/partials/scarlett-capture.html]
Serving: [/home/daeavelwyn/AJW/mixers/partials/scarlett-master.html]
AJG: Soundcard Devid=hw:USB Cardid=USB     Name=Focusrite Scarlett 18i20 USB at usb-0000:00:14.0-1, high speed
AJG:empty  [ 29]: [Scarlett 18i20 USB] no session at [/home/daeavelwyn/AJW/sessions]
5: alsajson CTRL_GET_ALL
AJG: Soundcard Devid=hw:USB Cardid=USB     Name=Focusrite Scarlett 18i20 USB at usb-0000:00:14.0-1, high speed
7: alsajson SESSION_LOAD cardid=hw:USB session=current-session
AJG: Soundcard Devid=hw:USB Cardid=USB     Name=Focusrite Scarlett 18i20 USB at usb-0000:00:14.0-1, high speed
json_object_from_file: error opening file Scarlett 18i20 USB/active-session.ajg: No such file or directory
AJG:empty  [ 30]: File [Scarlett 18i20 USB/active-session.ajg] not found
Serving: [/home/daeavelwyn/AJW/mixers/partials/matrix-fader.html]
AJG: Soundcard Devid=hw:USB Cardid=USB     Name=Focusrite Scarlett 18i20 USB at usb-0000:00:14.0-1, high speed
AJG:empty  [ 31]: [Scarlett 18i20 USB] no session at [/home/daeavelwyn/AJW/sessions]
10: alsajson CTRL_GET_ALL
AJG: Soundcard Devid=hw:USB Cardid=USB     Name=Focusrite Scarlett 18i20 USB at usb-0000:00:14.0-1, high speed
12: alsajson GATEWAY_PING
AJG:success [ 32]: 12
13: alsajson GATEWAY_PING
AJG:success [ 33]: 13
14: alsajson GATEWAY_PING
AJG:success [ 34]: 14
^CINF:signalQuit received signal to quit
INF:main returning from longjump after signal [2]

(14-Sep 23:34) INF:main pid=7560 received exit signal (Hopefully crtl-C or --kill-previous !!!)

I also attached a screenhot of the mixer view.

alsajsonmixer_scarlett18i20-2ndgen

I also have to say qasmixer doesn't show me mixer's capabilities
qasmixer_scarlett18i20

I'd really appreciate informations or workaround to help me to debug this :)

Error 1 while compiling

Greetings! Tried to compile your project on Garuda Linux (Arch family).

Got this error:

Making all in src
make[1]: Entering directory '/home/sa/AlsaJsonGateway/src'
  CC       ajg_daemon-main-ajg.o
  CC       ajg_daemon-config-ajg.o
  CC       ajg_daemon-httpd-ajg.o
httpd-ajg.c: In function ‘httpdStart’:
httpd-ajg.c:456:13: error: passing argument 3 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  456 |             &newClient, NULL,       // Tcp Accept call back + extra attribute
      |             ^~~~~~~~~~
      |             |
      |             int (*)(void *, const struct sockaddr *, socklen_t) {aka int (*)(void *, const struct sockaddr *, unsigned int)}
In file included from httpd-ajg.c:39:
/usr/include/microhttpd.h:2479:44: note: expected ‘MHD_AcceptPolicyCallback’ {aka ‘enum MHD_Result (*)(void *, const struct sockaddr *, unsigned int)’} but argument is of type ‘int (*)(void *, const struct sockaddr *, socklen_t)’ {aka ‘int (*)(void *, const struct sockaddr *, unsigned int)’}
 2479 |                   MHD_AcceptPolicyCallback apc, void *apc_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
httpd-ajg.c:457:13: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  457 |             &newRequest, session,  // Http Request Call back + extra attribute
      |             ^~~~~~~~~~~
      |             |
      |             int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from httpd-ajg.c:39:
/usr/include/microhttpd.h:2480:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2480 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:526: ajg_daemon-httpd-ajg.o] Error 1
make[1]: Leaving directory '/home/sa/AlsaJsonGateway/src'
make: *** [Makefile:400: all-recursive] Error 1
[sudo] password for sa: 
Making install in src
make[1]: Entering directory '/home/sa/AlsaJsonGateway/src'
  CC       ajg_daemon-httpd-ajg.o
httpd-ajg.c: In function ‘httpdStart’:
httpd-ajg.c:456:13: error: passing argument 3 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  456 |             &newClient, NULL,       // Tcp Accept call back + extra attribute
      |             ^~~~~~~~~~
      |             |
      |             int (*)(void *, const struct sockaddr *, socklen_t) {aka int (*)(void *, const struct sockaddr *, unsigned int)}
In file included from httpd-ajg.c:39:
/usr/include/microhttpd.h:2479:44: note: expected ‘MHD_AcceptPolicyCallback’ {aka ‘enum MHD_Result (*)(void *, const struct sockaddr *, unsigned int)’} but argument is of type ‘int (*)(void *, const struct sockaddr *, socklen_t)’ {aka ‘int (*)(void *, const struct sockaddr *, unsigned int)’}
 2479 |                   MHD_AcceptPolicyCallback apc, void *apc_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
httpd-ajg.c:457:13: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  457 |             &newRequest, session,  // Http Request Call back + extra attribute
      |             ^~~~~~~~~~~
      |             |
      |             int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from httpd-ajg.c:39:
/usr/include/microhttpd.h:2480:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2480 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:526: ajg_daemon-httpd-ajg.o] Error 1
make[1]: Leaving directory '/home/sa/AlsaJsonGateway/src'
make: *** [Makefile:400: install-recursive] Error 1

Probably this is the important part:

error: passing argument 3 of ‘MHD_start_daemon’ from incompatible pointer type

Would be happy if you could lead me; if this is something with a code; or with my system.
I've checked deps and I think they are installed OK.
Thanks.

Fix build when using libmicrohttpd 0.9.75

Building on ubuntu 22.04 requires a trivial fix due to some changes in the libmicrohttpd version available for installation through apt-get.

It's about an int argument being replaced with an enum, the full diff of the changes that fix the issue is here:

@@ -103,7 +103,7 @@ static void endRequest (void *cls, struct MHD_Connection *connection, void **con
 
 
 // process rest API query
-STATIC int requestApi (struct MHD_Connection *connection, AJG_session *session, const char *method,  const char* url
+STATIC enum MHD_Result requestApi (struct MHD_Connection *connection, AJG_session *session, const char *method,  const char* url
                       , const char *upload_data, size_t *upload_data_size, void **con_cls) {
   const char  *query, *param;
   json_object *cmd;
@@ -333,7 +333,7 @@ STATIC void computeEtag (char *etag, int maxlen, struct stat *sbuf) {
 }
 
 // minimal httpd file server for static HTML,JS,CSS,etc...
-STATIC int requestFile (struct MHD_Connection *connection, AJG_session *session, const char* url) {
+STATIC enum MHD_Result requestFile (struct MHD_Connection *connection, AJG_session *session, const char* url) {
     int fd;
     int ret;
     struct stat sbuf;
@@ -414,7 +414,7 @@ STATIC int requestFile (struct MHD_Connection *connection, AJG_session *session,
     return ret;
 }
 
-STATIC int newRequest (void *cls,
+STATIC enum MHD_Result newRequest (void *cls,
   struct MHD_Connection *connection,
   const char *url,
   const char *method,
@@ -435,7 +435,7 @@ STATIC int newRequest (void *cls,
 }
 
 
-STATIC int newClient (void *cls, const struct sockaddr * addr, socklen_t addrlen) {
+STATIC enum MHD_Result newClient (void *cls, const struct sockaddr * addr, socklen_t addrlen) {
   // check if client is comming from an acceptable IP
   return (MHD_YES); // MHD_NO
 }
 
 // minimal httpd file server for static HTML,JS,CSS,etc...
-STATIC int requestFile (struct MHD_Connection *connection, AJG_session *session, const char* url) {
+STATIC enum MHD_Result requestFile (struct MHD_Connection *connection, AJG_session *session, const char* url) {

I could open a PR if the changes are ok.

Installation problems

Hello. I am having a number of issues attempting to install this and getting it to work properly with Alsa Json Mixer.

I am using Fedora 28. All dependencies install fine and compiles complete without error. Only problems with installing and actually getting it to work. I think a simple step by step, copy commands from readme file would be more helpful than the video.

  1. The instructions say export AJW_DIR=$HOME/AJW. However, should this be /opt/ajg-daemon instead?
  2. sudo make install does not create /opt/ajg-daemon directory. Even if I manually create it, nothing is installed there. Instead, there are files installed into /usr/local/var/www/fakemod. I cannot see that any other files are installed anywhere else.

Please provide some guidance, I am very interested in the excellent work you have done and using my Scarlett 6i6!

make a release for xenial in PPA

The PPA isn't usable for newer systems 16.04 or 16.10 because there's been no release published. Please publish one so the PPA is usable. Thanks

Segfault when calling session-store with GET request

While it should throw an error, calling the session-store method with a GET request succeeds then shortly after dumps core with a segmentation fault.

177: alsajson SESSION_STORE cardid=hw:3 session=foo
AJG:success [168]: Session= [Scarlett 18i8 USB/foo.ajg] saved on disk
ajg-daemon: json_object.c:189: json_object_put: Assertion `jso->_ref_count > 0' failed.
(03-Aug 01:51) ERR:getAllBlock acquisition timeout
Segmentation fault (core dumped)

call to __builtin__strncat_chk might overflow destination butter

I am getting this with fresh checkout (ubuntu 16.04, gcc 5.4.0):

In function ‘strncat’,
    inlined from ‘alsaFakeResponse.isra.0’ at alsa-ajg.c:60:12:
/usr/include/x86_64-linux-gnu/bits/string3.h:156:10: error: call to __builtin___strncat_chk might overflow destination buffer [-Werror]
   return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));

The workaround is to call ./configure CFLAGS=-Wno-error .

Fail to open file: [/home/pi/AJW/index.html]

Hello, just testing this on a Raspberry Pi, installation worked fine but running the daemon errors on requesting the page from a browser:

pi@music-stack-rpi:~ $ ajg-daemon --rootdir=$AJW_DIR --verbose --port=1234
AJG:notice: config at /home/pi/AJW/sessions/AJG-config.json: No such file or directory
AJG:notice checking session dir [/home/pi/AJW/sessions]
AJG:notice Init config done
AJG:notice Foreground mode
AJG:notice Waiting port=1234 rootdir=/home/pi/AJW
AJG:notice Browser URL= http://localhost:1234
AJG:notice entering httpd waiting loop
AJG:notice Use Ctrl-C to quitFail to open file: [/home/pi/AJW/index.html] error:No such file or directory
Fail to open file: [/home/pi/AJW/favicon.ico] error:No such file or directory

Some diagnostics:

pi@music-stack-rpi:~ $ echo $AJW_DIR
/home/pi/AJW

pi@music-stack-rpi:~ $ ll $AJW_DIR
total 16
drwxr-xr-x  3 pi pi 4096 Aug 13 12:13 .
drwxr-xr-x 16 pi pi 4096 Aug 13 12:12 ..
-rw-r--r--  1 pi pi  255 Aug 13 12:12 AJG-config.json
drwxr-xr-x  2 pi pi 4096 Aug 13 12:01 sessions

pi@music-stack-rpi:~ $ uname -a
Linux music-stack-rpi 5.4.51-v7+ #1333 SMP Mon Aug 10 16:45:19 BST 2020 armv7l GNU/Linux

pi@music-stack-rpi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: USB [Scarlett 18i8 USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

pi@music-stack-rpi:~ $ ifconfig wlan0 | grep inet
        inet 192.168.0.129  netmask 255.255.255.0  broadcast 192.168.0.255

Loading http://192.168.0.129:1234/index.html in browser renders this:

Alsa-Json-Gateway Unknown or Not readable file

Where does index.html get generated? I don't see any obvious errors during the build steps. Thanks for your help!

Some routing not updated when opening a preset

First off, thanks for creating this software! I'm not sure if the problem I'm having is with my setup or if it's a bug.

I'm having an issue where after I start up a session and choose a preset in the HTML5 interface, I have to toggle some of the routing selections to something else and then back in order to make it work. For example, If Capture 1 is set to "Analog 1" in the preset, and I try to record from Capture 1, nothing will come through until I toggle Capture 1 to "Off" (or another selection) and then back to "Analog 1". This happens with some volume controls, input selections, capture selections, master playback route selections, and potentially other controls.

The interface I'm using is the 18i8. My machine is running Ubuntu Studio 14.10 with all up-to-date software. I installed the 4.0 realtime linux kernel to get the improved support for the interface. I'm happy to provide any other information that might.

compiling error - recipe for target failed

Dear Author,

I am having trouble compiling, when i issue 'make' I receive the errors ->

Making all in src
make[1]: Entering directory '/home/james/AlsaJsonGateway/src'
CC ajg_daemon-alsa-ajg.o
In file included from /usr/include/string.h:635:0,
from ../include/local-def-ajg.h:29,
from alsa-ajg.c:29:
In function ‘strncat’,
inlined from ‘alsaFakeResponse.isra.0’ at alsa-ajg.c:60:12:
/usr/include/x86_64-linux-gnu/bits/string3.h:156:10: error: call to __builtin___strncat_chk might overflow destination buffer [-Werror]
return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
^
cc1: all warnings being treated as errors
Makefile:530: recipe for target 'ajg_daemon-alsa-ajg.o' failed
make[1]: *** [ajg_daemon-alsa-ajg.o] Error 1
make[1]: Leaving directory '/home/james/AlsaJsonGateway/src'
Makefile:399: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Would you please help me to understand the error and fix it? I would love to be able to use my 18i20 with Linux.

Best wishes,

fisch

Configure fail

Manu, autoconf does not work on OpenSuse
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether to enable Valgrind on the unit tests... checking for valgrind... no
yes
./configure: line 5127: syntax error near unexpected token 2.2' ./configure: line 5127:LT_PREREQ(2.2)'

Focusrite 6i6 2nd Gen

Bonjour, merci pour votre travail !

J'ai un souci avec votre outil, le rapport du GET_ALL est celui-ci :

{ "sndcard": { "ajgtype": "AJG_sndcard", "cardid": "USB", "name": "Scarlett 6i6 USB" }, "ajgtype": "AJG_session", "status": { "ajgtype": "AJG_message", "status": "success" }, "data": [ { "numid": 3, "actif": true, "value": [ 1 ] }, { "numid": 2, "actif": true, "value": [ 0, 0, 0, 0, 0, 0 ] }, { "numid": 1, "actif": true, "value": [ 0, 0, 0, 0, 0, 0 ] } ], "timestamp": "Thu Jun 15 19:58:57 2017\n", "info": { "ajgtype": "AJG_infos", "data": [ { "uid": "session", "label": "Test" }, { "uid": "info", "label": "Test" } ] } }

Le retour de amixer -c2 contents est le même qu'au dessus.
Aucun controle n’apparaît sur l'interface Web et je ne vois pas trop quoi faire de plus. Que me conseillez-vous pour avancer dans la configuration de ma carte ?

Merci d'avance,

Amaury

MHD_start_daemon error when trying to install/build

Hi there, I'm on a fresh install of Pop OS 22.04 and I can't seem to run the final command for building in the readme. I've got an 18i20 that is detected by the OS and shows that audio is outputting through the settings and in easyeffects, but there's no audio coming through any of the outputs on the device (I've tried them all)
alsamixer shows that it recognizes the device and all its IO, and correctly shows volumes being changed when I turn the knobs, but again, no actual audio coming through. Ive got a 2i2 that works perfectly fine out of the box so I know its not the hardware connected to the devices. The following is the message I receive when trying to build. Any help is appreciated. thx.

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/chvrlie/AlsaJsonGateway/build-aux/missing: Unknown `--is-lightweight' option
Try `/home/chvrlie/AlsaJsonGateway/build-aux/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking whether to enable Valgrind on the unit tests... checking for valgrind... no
yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for alsa... yes
checking for libmicrohttpd... yes
checking for json-c... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: executing depfiles commands
config.status: executing libtool commands

	Type 'make' to compile AlsaJsonGateway.

Making all in src
make[1]: Entering directory '/home/chvrlie/AlsaJsonGateway/src'
  CC       ajg_daemon-httpd-ajg.o
httpd-ajg.c: In function ‘httpdStart’:
httpd-ajg.c:456:13: error: passing argument 3 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  456 |             &newClient, NULL,       // Tcp Accept call back + extra attribute
      |             ^~~~~~~~~~
      |             |
      |             int (*)(void *, const struct sockaddr *, socklen_t) {aka int (*)(void *, const struct sockaddr *, unsigned int)}
In file included from httpd-ajg.c:39:
/usr/include/microhttpd.h:2700:44: note: expected ‘MHD_AcceptPolicyCallback’ {aka ‘enum MHD_Result (*)(void *, const struct sockaddr *, unsigned int)’} but argument is of type ‘int (*)(void *, const struct sockaddr *, socklen_t)’ {aka ‘int (*)(void *, const struct sockaddr *, unsigned int)’}
 2700 |                   MHD_AcceptPolicyCallback apc, void *apc_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
httpd-ajg.c:457:13: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  457 |             &newRequest, session,  // Http Request Call back + extra attribute
      |             ^~~~~~~~~~~
      |             |
      |             int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from httpd-ajg.c:39:
/usr/include/microhttpd.h:2701:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2701 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:527: ajg_daemon-httpd-ajg.o] Error 1
make[1]: Leaving directory '/home/chvrlie/AlsaJsonGateway/src'
make: *** [Makefile:400: all-recursive] Error 1
Making install in src
make[1]: Entering directory '/home/chvrlie/AlsaJsonGateway/src'
  CC       ajg_daemon-httpd-ajg.o
httpd-ajg.c: In function ‘httpdStart’:
httpd-ajg.c:456:13: error: passing argument 3 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  456 |             &newClient, NULL,       // Tcp Accept call back + extra attribute
      |             ^~~~~~~~~~
      |             |
      |             int (*)(void *, const struct sockaddr *, socklen_t) {aka int (*)(void *, const struct sockaddr *, unsigned int)}
In file included from httpd-ajg.c:39:
/usr/include/microhttpd.h:2700:44: note: expected ‘MHD_AcceptPolicyCallback’ {aka ‘enum MHD_Result (*)(void *, const struct sockaddr *, unsigned int)’} but argument is of type ‘int (*)(void *, const struct sockaddr *, socklen_t)’ {aka ‘int (*)(void *, const struct sockaddr *, unsigned int)’}
 2700 |                   MHD_AcceptPolicyCallback apc, void *apc_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
httpd-ajg.c:457:13: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  457 |             &newRequest, session,  // Http Request Call back + extra attribute
      |             ^~~~~~~~~~~
      |             |
      |             int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from httpd-ajg.c:39:
/usr/include/microhttpd.h:2701:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2701 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:527: ajg_daemon-httpd-ajg.o] Error 1
make[1]: Leaving directory '/home/chvrlie/AlsaJsonGateway/src'
make: *** [Makefile:400: install-recursive] Error 1

issue with make

Hello and thanks for the work you do on this! I am getting an error in attempting to make the the file. Please see the following:

In function ‘strncat’,
inlined from ‘alsaFakeResponse.isra.0’ at alsa-ajg.c:60:12:
/usr/include/x86_64-linux-gnu/bits/string3.h:156:10: error: call to __builtin___strncat_chk might overflow destination buffer [-Werror]
return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.