Source-Changes-D archive

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

Re: audio null_filter (Re: CVS commit: src/sys/dev)



G'Day,

On Sat, 29 Jul 2017 15:14:39 Tetsuya Isaki wrote:
> Thanks nat@.  It works.
> autoconfig succeeded and audioplay(1) also worked.
> Please commit it.

That's great news :)

I'll commit it and request pullups.

> 
> # Although there is still another problem that the ring buffer
> # management or somewhere is something wrong. :(
> 
> Can you describe audio(9) on cases using the special null_filter?
> 
> However, is it a correct solution to insert such an extra memcpy
> filter?  It seems to me that it's trying to cover the first bug
> with the second bug.
> 
.
For vchan_autoconfig, as you've seen there is a test for precision frequency 
and validbits the problem with vs(4) and some dec machines using a7930 audio 
codecs is that the hardware precision or the first filter in the case of vs(4) 
is equal to 4 bits and the top most filter SLINEAR is 16 bits so auto config of 
audio would fail.

By using the null filter as the first one closest to hardware with precision and 
validbits set to 16 -> then the acdpm filter -> then slinear auto config will 
succeed as the null filter reports 16 bits and the final slinear filter reports 
16 bits.

I would really like to do away with the null_filter and vchan_autoconfig and 
just set it to 16 bit 48000 Hz stereo.  But to do that drivers/cards that 
don't support this would have to be changed to use 
auconv/auconv_set_converter.

Ideally all sound drivers should use auconv as vchan_autoconfig is a hack.

Best regards,

Nat

> According to audio(9), we should pass the destination encoding
> (ENCODING_ADPCM) as msm6258_slinear16_to_adpcm filter's parameter,
> but msm6258_slinear16_to_adpcm filter seems to interrupt this
> as source encoding (That is why I commited the diagnostic code
> in sys/dev/ic/msm6258.c r1.18).  Therefore, I don't know details
> but I can imagine that it works by inserting this null_filter.
> 
> Thanks,
> ---
> Tetsuya Isaki <isaki%pastel-flower.jp@localhost / isaki%NetBSD.org@localhost>
> 


Home | Main Index | Thread Index | Old Index