All of lore.kernel.org
 help / color / mirror / Atom feed
* Soundmodem and sampling rate: force a rate?
@ 2005-10-25 14:22 J. Lance Cotton
  2005-10-26  5:46 ` David Rivenburg
  0 siblings, 1 reply; 3+ messages in thread
From: J. Lance Cotton @ 2005-10-25 14:22 UTC (permalink / raw)
  To: linux-hams

I am trying to get soundmodem (usermode) working with a Soundblaster
Live card on SuSE 9.3 and the commercial OSS driver.

The problem is that apparently the SB card supports only 8k, 11.025k,
12k, ... sampling rates. At 1200bps AFSK, soundmodem demodulator asks
for (or gets) 9600Hz sampling rate.

Something, as far as I can tell, is opening the soundcard for recording at 
9600Hz sample rate, but I've been told that that rate isn't supported by my 
SB Live card. I thought that in that instance, the "next closest" rate would 
be returned instead...

I do not know if this is a problem with the Commercial OSS driver, the SB 
Live card, or soundmodem. I've tried editing the soundcard/audioio.c file to 
"force" other sample rates. It does open the card at the forced rate, but 
the decoding still doe not work reliably. (The problem is exemplified in the 
samples I recorded and put at 
http://www.cmsworldwide.com/Files/soundsamples/index.html )

**Question: Is there any official way to have soundmodem request a 
user-custom sampling rate? Like a hidden config?

Thanks. 73 KJ5O

-- 
J. Lance Cotton, KJ5O
joe@lightningflash.net
http://kj5o.lightningflash.net
Three Step Plan: 1. Take over the world. 2. Get a lot of cookies. 3. Eat
the cookies.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Soundmodem and sampling rate: force a rate?
  2005-10-25 14:22 Soundmodem and sampling rate: force a rate? J. Lance Cotton
@ 2005-10-26  5:46 ` David Rivenburg
  2005-10-26 23:32   ` J. Lance Cotton
  0 siblings, 1 reply; 3+ messages in thread
From: David Rivenburg @ 2005-10-26  5:46 UTC (permalink / raw)
  To: J. Lance Cotton, linux-hams

J. Lance Cotton wrote:
> I am trying to get soundmodem (usermode) working with a Soundblaster
> Live card on SuSE 9.3 and the commercial OSS driver.
> 
> The problem is that apparently the SB card supports only 8k, 11.025k,
> 12k, ... sampling rates. At 1200bps AFSK, soundmodem demodulator asks
> for (or gets) 9600Hz sampling rate.
> 
> Something, as far as I can tell, is opening the soundcard for recording 
> at 9600Hz sample rate, but I've been told that that rate isn't supported 
> by my SB Live card. I thought that in that instance, the "next closest" 
> rate would be returned instead...
> 
> I do not know if this is a problem with the Commercial OSS driver, the 
> SB Live card, or soundmodem. I've tried editing the soundcard/audioio.c 
> file to "force" other sample rates. It does open the card at the forced 
> rate, but the decoding still doe not work reliably. (The problem is 
> exemplified in the samples I recorded and put at 
> http://www.cmsworldwide.com/Files/soundsamples/index.html )
> 
> **Question: Is there any official way to have soundmodem request a 
> user-custom sampling rate? Like a hidden config?
> 
> Thanks. 73 KJ5O
> 


I came across a similar thing.  Looking at the soundmodemconfig scope 
function I saw horizontal lines in the waveform - this is clearly 
impossible for an AC coupled signal so I suspected that 9600 was not a 
valid sample rate for my audio codec.  Here is what I did to fix it:


in line 233 of soundcard/main.c change

unsigned int samplerate = 5000, mode;
to
unsigned int samplerate = 11025, mode;


then in line 710 of configapp/src/diag.c change

diagstate.samplerate = 5000;
to
diagstate.samplerate = 11025;


Even though the sample rate is set to 5000 there is a selection routine 
in audioio.c that steps it up to 9600.  I tried editing the valid sample 
rate list there but it still used 9600.

After making the above changes I have not had any trouble at all with 
soundmodem.  Not that there aren't any, but I don't know of another way 
to force a sample rate.

Hope this helps.

Dave
AD5OO

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Soundmodem and sampling rate: force a rate?
  2005-10-26  5:46 ` David Rivenburg
@ 2005-10-26 23:32   ` J. Lance Cotton
  0 siblings, 0 replies; 3+ messages in thread
From: J. Lance Cotton @ 2005-10-26 23:32 UTC (permalink / raw)
  To: driven; +Cc: linux-hams

David Rivenburg wrote:
> Even though the sample rate is set to 5000 there is a selection routine 
> in audioio.c that steps it up to 9600.  I tried editing the valid sample 
> rate list there but it still used 9600.
> 
> After making the above changes I have not had any trouble at all with 
> soundmodem.  Not that there aren't any, but I don't know of another way 
> to force a sample rate.

Thanks for the hints. This does force a higher, valid sample rate. 
However, it doesn't seem to improve the operation of soundmodem on a SB 
Live card.

I've since found a different soundcard that works perfectly (with or 
without this modification), so problem solved one way or another.

KJ5O
-- 
J. Lance Cotton, KJ5O
joe@lightningflash.net
http://kj5o.lightningflash.net
Three Step Plan: 1. Take over the world. 2. Get a lot of cookies. 3. Eat 
the cookies.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-10-26 23:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-25 14:22 Soundmodem and sampling rate: force a rate? J. Lance Cotton
2005-10-26  5:46 ` David Rivenburg
2005-10-26 23:32   ` J. Lance Cotton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.