newbie soundmodem question about mic vs line input
I've got soundmodem working using the mic jack, but I'd rather use the line jack. When I try, I get nothing.. hence, the following questions.
1) Under linux, are the mic and line inputs mixed, or do they have seperate devices to open?
2) I can play with the mic/line/speaker/etc gains using aumix.. Does this have any effect on soundmodem, or does it set the gain using ioctls, etc.
3) The mic jack appears to be mono, where as the line jack appears to be stereo. Does soundmodem have any options to listen to the two channels seperately? i.e. I'd like to do APRS on one channel, and packet on another, but I fear that /dev/dsp is a mix. Is this correct?
thanks
- jim
Quoted 7 lines · On 2004.02.13 19:02:03 +0100 James Washer wrote:
I've got soundmodem working using the mic jack, but I'd rather use the line jack. When I try, I get nothing.. hence, the following questions.
1) Under linux, are the mic and line inputs mixed, or do they have seperate devices to open?
Normally you can select one of the inputs and get only audio from that input.
Open an app such as gmix and make sure the box for line in is checked.
Quoted 2 lines
2) I can play with the mic/line/speaker/etc gains using aumix.. Does this have any effect on soundmodem, or does it set the gain using ioctls, etc.
With this you control the mixer of your soundcard (and can probably select the input source as mentioned above) and as such you have to set it in a way that the levels that soundmodem gets are sane.
Quoted 4 lines
3) The mic jack appears to be mono, where as the line jack appears to be stereo. Does soundmodem have any options to listen to the two channels seperately? i.e. I'd like to do APRS on one channel, and packet on another, but I fear that
/dev/dspis a mix. Is this correct?
In theory on a stereo soundcard you get two seperate channels. So it should be possible, but I don't think the soundmodem code does that now... But they will both have the same bitrate so that would limit your possibilities a bit.
Jeroen
Soundmodem Logging
Hello all,
I'm using userspace soundmodem, and it works really great. However, I have a question about the soundmodem logging setup.
I have the following in my script that starts up soundmodem:
soundmodem -sM -v 9
According to my reading, the -s switch should switch logging to the syslog, and the -v 9 switch should enable massive amounts of logging.
However, despite this, the syslog only gets one entry showing syslog startup, while the console gets the massive spew of log items.
Is there any way to redirect all these messages to the syslog instead, where I believe my command line setup told them to go?
Thanks,
Dave
VA3BHF
Re: Soundmodem Logging
Quoted 6 lines · Dave Stubbs
Hello all,
I'm using userspace soundmodem, and it works really great. However, I have a question about the soundmodem logging setup.
I have the following in my script that starts up soundmodem:
Quoted 7 lines
soundmodem -sM -v 9
According to my reading, the -s switch should switch logging to the syslog, and the -v 9 switch should enable massive amounts of logging.
However, despite this, the syslog only gets one entry showing syslog startup, while the console gets the massive spew of log items.
Is there any way to redirect all these messages to the syslog instead, where I believe my command line setup told them to go?
Just a guess, but check your syslog.conf file to see what it is doing with the messages by facility and loglevel ... it may be receiving them OK and then redirecting them to the console.
... Niall (VE7HEX)
Re: Soundmodem Logging
Quoted 10 lines · Niall Parker
Quoted 8 lines · Dave Stubbs
Hello all,
I'm using userspace soundmodem, and it works really great. However, I have a question about the soundmodem logging setup.
I have the following in my script that starts up soundmodem:
soundmodem -sM -v 9
Quoted 9 lines
Quoted 5 lines
According to my reading, the -s switch should switch logging to the syslog, and the -v 9 switch should enable massive amounts of logging.
However, despite this, the syslog only gets one entry showing syslog startup, while the console gets the massive spew of log items.
Is there any way to redirect all these messages to the syslog instead, where I believe my command line setup told them to go?
Just a guess, but check your syslog.conf file to see what it is doing with the messages by facility and loglevel ... it may be receiving them OK and then redirecting them to the console.
Got that one covered. I'm redirecting all syslog messages, no matter how insignificant or from what facility, to a central logging server which puts them in a MySQL database. From other programs running on the same hambox as soundmodem, I'm getting so much information it's crazy, so I don't think syslog is the problem in this case. Is anyone else using syslog to track soundmodem packets?
One other thought - maybe the trace that's coming up on my console is not from the soundmodem software - maybe it's from kernel AX.25 code or something? Is there a way to redirect *that* to the syslog?
Dave...
Re: Soundmodem Logging
Quoted 20 lines · Dave Stubbs
Quoted 18 lines · Niall Parker
Quoted 13 lines · Dave Stubbs
Hello all,
I'm using userspace soundmodem, and it works really great. However, I have a question about the soundmodem logging setup.
I have the following in my script that starts up soundmodem:
soundmodem -sM -v 9
According to my reading, the -s switch should switch logging to the syslog, and the -v 9 switch should enable massive amounts of logging.
However, despite this, the syslog only gets one entry showing syslog startup, while the console gets the massive spew of log items.
Is there any way to redirect all these messages to the syslog instead, where I believe my command line setup told them to go?
Quoted 6 lines
Quoted 2 lines
Just a guess, but check your syslog.conf file to see what it is doing with the messages by facility and loglevel ... it may be receiving them OK and then redirecting them to the console.
Got that one covered. I'm redirecting all syslog messages, no matter how insignificant or from what facility, to a central logging server which puts them in a MySQL database. From other programs running on the same hambox as soundmodem, I'm getting so much information it's crazy, so I don't think syslog is the problem in this case. Is anyone else using syslog to track soundmodem packets?
One other thought - maybe the trace that's coming up on my console is not from the soundmodem software - maybe it's from kernel AX.25 code or something? Is there a way to redirect *that* to the syslog?
Well,
I was able to confirm that. I set my soundmodem to -v 0 and rebooted. The piddly little syslog trail vanished, but I still got the massive spew of all packets on the console. I put the -v 9 back into soundmodem startup and the syslog messages started again (such as they are) and the console spew remains.
So, a new question - does anyone know where the console messages (they start with "Tx:") come from? Can they be redirected to syslog or sent there instead of the console?
Thankyou,
Dave...
VA3BHF
Re: Soundmodem Logging
Quoted 3 lines · Dave Stubbs
So, a new question - does anyone know where the console messages (they start with "Tx:") come from? Can they be redirected to syslog or sent there instead of the console?
It's soundmodem in soundcard/kisspkt.c:
line 306: printf("Rx: %s\n", buf);
and
line 407: printf("Tx: %s\n", buf);
So it's hardcoded to go to stdout, you need to modify the source to make it go elsewhere.
Signature · 1 line
Tomi Manninen / OH2BNS / KP20JF74
Re: Soundmodem Logging
Quoted 10 lines · Tomi Manninen
Quoted 3 lines · Dave Stubbs
So, a new question - does anyone know where the console messages (they start with "Tx:") come from? Can they be redirected to syslog or sent there instead of the console?
It's soundmodem in
soundcard/kisspkt.c:
Quoted 10 lines
line 306:
printf("Rx: %s\n", buf);and
line 407:
printf("Tx: %s\n", buf);So it's hardcoded to go to stdout, you need to modify the source to make it go elsewhere.
Indeed.
Well, there's the culprit. Actually, what I would really like to see is the same output from *listen -a* showing up in the syslog. Is there a way to do something like "listen -a > /dev/log" or something like that? It seems that I can't redirect stdout to a FIFO, or this would work. Is there a tool that would do it then?
Thanks for the help,
Dave
Re: Soundmodem Logging
Quoted 33 lines · Dave Stubbs
Quoted 12 lines · Tomi Manninen
Quoted 5 lines · Dave Stubbs
So, a new question - does anyone know where the console messages (they start with "Tx:") come from? Can they be redirected to syslog or sent there instead of the console?
It's soundmodem in
soundcard/kisspkt.c:Quoted 11 lines
line 306:
printf("Rx: %s\n", buf);and
line 407:
printf("Tx: %s\n", buf);So it's hardcoded to go to stdout, you need to modify the source to make it go elsewhere.
Indeed.
Well, there's the culprit. Actually, what I would really like to see is the same output from *listen -a* showing up in the syslog. Is there a way to do something like "listen -a >
/dev/log" or something like that? It seems that I can't redirect stdout to a FIFO, or this would work. Is there a tool that would do it then?
Quoted 4 lines
Thanks for the help,
Dave
-
I used this function for showing up in the syslog, it may be modified for your use:
#include <syslog.h>
#define LOG_LEVEL LOG_INFO
void log(int loglevel, const char *fmt, ...)
{
va_list args;
int pri;
static int opened = 0;
if (!opened) {
openlog("your_identifier", LOG_CONS, LOG_LOCAL6);
opened = 1;
}
pri = loglevel;
va_start(args, fmt);
vsprintf(buf, fmt, args);
syslog(pri, buf);
va_end(args);
}log(LOG_LEVEL, "%d %s%d.%06d %ld\n", dcft.tv_sec, sign? "-": "+", delta.tv_sec, delta.tv_usec, tx.freq);
--
73 Gérard F6FGZ
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
Quoted 2 lines
1) Under linux, are the mic and line inputs mixed, or do they have seperate devices to open?
It's one device, with the input (recording) device selected by ioctls.
Quoted 3 lines
2) I can play with the mic/line/speaker/etc gains using aumix.. Does this have any effect on soundmodem, or does it set the gain using ioctls, etc.
Soundmodem does not touch the sound card mixer settings nor does it change the input selection. These must be set with a regular mixer application. I use gmix.
Quoted 5 lines
3) The mic jack appears to be mono, where as the line jack appears to be stereo. Does soundmodem have any options to listen to the two channels seperately? i.e. I'd like to do APRS on one channel, and packet on another, but I fear that
/dev/dspis a mix. Is this correct?
Whether recording is stereo or mono (usually mono == left channel) is again selected with ioctls. Soundmodem sets the device for mono input and output.
Signature · 1 line
Tomi Manninen / OH2BNS / KP20ME04