uaudio patch,

Julian Elischer julian at elischer.org
Wed Apr 27 01:14:03 PDT 2005


Julian Elischer wrote:
> Julian Elischer wrote:
> 
>> Kazuhito HONDA wrote:
>>
>>> Hello,
>>>
>>> From: Pyun YongHyeon <yongari at kt-is.co.kr>
>>> Subject: Re: uaudio patch, configurable buffer size
>>> Date: Mon, 7 Mar 2005 12:04:19 +0900
>>>
>>>
>>>> AFAIK, we already have format converter in kernel.
>>>> See feeder_fmt.c. The converter detects differences between hardware
>>>> capabilities and audio samples and automatically converts it(e.g.
>>>> big endian <->little endian, mono <-> stereo, signed <-> unsigned,
>>>> ulaw<->alow etc).
>>>
>>>
>>>
>>>
>>> Ah, I haven't found it for a long time.  I tried to change the caps 
>>> in uaudio_pcm.c, and a sampling rate can be converted correctly as 
>>> you wrote.
>>>
>>> I'll challenge to use this converter in uaudio, too.
>>> If I or someone will succeed in it, I'll write to PR usb/78028 that 
>>> it should be closed except applied.
>>
>>
>>
>> while I closed this, I have sort of changed my mind..
>> this  PR gives teh following result:
>>
>>  At least they work and produce the following output:
>>  ---snip---
>>  pcm0: <USB Audio> at addr ? (1p/1r/0v channels duplex default)
>>          playback: 2ch, 16/16bit, pcm, 44100Hz
>>          playback: 2ch, 24/24bit, pcm, 44100Hz
>>          playback: 4ch, 16/16bit, pcm, 44100Hz
>>          playback: 4ch, 24/24bit, pcm, 44100Hz
>>          playback: 6ch, 16/16bit, pcm, 44100Hz
>>          playback: 6ch, 24/24bit, pcm, 44100Hz
>>          playback: 2ch, 16/16bit, pcm, 48000Hz
>>          playback: 2ch, 24/24bit, pcm, 48000Hz
>>          playback: 4ch, 16/16bit, pcm, 48000Hz
>>          playback: 4ch, 24/24bit, pcm, 48000Hz
>>          playback: 6ch, 16/16bit, pcm, 48000Hz
>>          playback: 6ch, 24/24bit, pcm, 48000Hz
>>          playback: 2ch, 16/16bit, pcm, 96000Hz
>>          playback: 2ch, 24/24bit, pcm, 96000Hz
>>          recording: 2ch, 16/16bit, pcm, 44100Hz
>>          recording: 2ch, 24/24bit, pcm, 44100Hz
>>          recording: 2ch, 16/16bit, pcm, 48000Hz
>>          recording: 2ch, 24/24bit, pcm, 48000Hz
>>          recording: 2ch, 16/16bit, pcm, 96000Hz
>>          recording: 2ch, 24/24bit, pcm, 96000Hz
>>
>>
>> I think this information is important and not available anywhere else.
>>
>> I tried applying it but it didn't work on top of Matt's last patch.
>> I'll have to try it with the unchanged version.
> 
> 
> with uaudio out of -current I see:
> pcm1: <USB Audio> at addr ? (0p/1r/0v channels duplex)
>         recording: 1ch, 16/16bit, pcm, 44100Hz
>         recording: 1ch, 16/16bit, pcm, 22050Hz
>         recording: 1ch, 16/16bit, pcm, 11025Hz
>         recording: 1ch, 16/16bit, pcm, 8000Hz


with a little change:
# cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <ESS Technology Maestro-2E> port 0x1400-0x14ff irq 5 at device 8.0 on pci0 
(4p/1r/0v channels duplex default)
pcm1: <USB Audio> at addr ? (0p/1r/0v channels duplex)
         mode 1:(recording) 1ch, 16/16bit, pcm, 44100Hz
         mode 2:(recording) 1ch, 16/16bit, pcm, 22050Hz
         mode 3:(recording) 1ch, 16/16bit, pcm, 11025Hz
         mode 4:(recording) 1ch, 16/16bit, pcm, 8000Hz

is this worth commiting?
and would "input" be better than "recording"?


> 
> The question now is:
> "How the heck to I select which one to use?"
> 
> 
> 
> 
> 
> 
>>
>> Matt can you make a version of this that works with your change?
>> (I guess the fact that your patch stopped my mic. might have made this 
>> fail as well. maybe it still works but your patch is the problem...
>>
>> julian
>>



More information about the freebsd-multimedia mailing list