discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Increasing ALSA Sampling Rate


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] Increasing ALSA Sampling Rate
Date: Mon, 31 Jan 2011 14:45:03 -0500

On Mon, Jan 31, 2011 at 1:10 PM, George S. Williams <address@hidden> wrote:
> Hey, Tom,
>
> Thanks for the reply. I'm not sure that it's entirely an ALSA problem.
>
> Both my aplay and snd-bt88x are patched to allow 1792000. If I do-
> arecord -D hw:1,1 -r 1792000 -f S16_LE -t wav -d 5 test0.wav
>
> I get-
> Recording WAVE 'test0.wav' : Signed 16 bit Little Endian, Rate 1792000 Hz,
> Mono
>
> And- soxi reports-
> Input File     : 'test0.wav'
> Channels       : 1
> Sample Rate    : 1.792e+06
> Precision      : 16-bit
> Duration       : 00:00:05.00 = 8960000 samples ~ 375 CDDA sectors
> Sample Encoding: 16-bit Signed Integer PCM
>
> So it looks to me like ALSA recorded at 1792000.
>
> Wish I knew more about ALSA and gnuradio- probably will before it's over.
>
> George

Ok, gotcha. Then I'll reword what I said; it must be a problem with
how we are using ALSA :)

Like I said, though, this is not my area of expertise, so I'm hoping
someone else with more knowledge of the ALSA API can help out.

Tom



> On 1/31/2011 10:30 AM, Tom Rondeau wrote:
>>
>> On Thu, Jan 27, 2011 at 11:38 AM, George S. Williams<address@hidden>
>>  wrote:
>>>
>>> Is it possible to increase the maximum sampling rate for audio_alsa?
>>>
>>> I am experimenting with using a modified TV tuner card as an ADC. The
>>> card
>>> uses a Bt878a chipset. arecord can record from the card at 1972000 rate
>>> and
>>> GRC shows the maximum rate as 1972000, but GNUradio can only sample at
>>> 896000.
>>>
>>> Running GNUradio at 1972000 rate gives the following error-
>>>
>>>
>>> audio_alsa_source[hw:2,1]: get_period_size failed: Invalid argument
>>> Traceback (most recent call last):
>>>  File "/root/top_block.py", line 81, in<module>
>>>    tb = top_block()
>>>  File "/root/top_block.py", line 49, in __init__
>>>    self.audio_source_0 = audio.source(samp_rate, "hw:2,1", True)
>>>  File "/usr/local/lib/python2.6/site-packages/gnuradio/audio_alsa.py",
>>> line
>>> 241, in source
>>>    return _audio_alsa.source(*args, **kwargs)
>>> RuntimeError: audio_alsa_source
>>>
>>>
>>> Is there some setting change that can enable the 1792000 rate?
>>>
>>> Thanks,
>>> George
>>
>>
>> George,
>> It appears that this error is occurring in the ALSA asound library
>> itself (see line 205 of gr-audio-alsa/src/audio_alsa_source.cc). I
>> haven't spent much time looking around the alsa implementation, so I
>> can't say for certain, but this appears to be a problem with ALSA, not
>> GNU Radio.
>>
>> Hopefully, someone else with much more knowledge about ALSA and it's
>> capabilities can tell you better.
>>
>> Tom
>>
>>
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 9.0.872 / Virus Database: 271.1.1/3414 - Release Date: 01/31/11
>> 02:34:00
>>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]