Source-Changes-D archive

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

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



Thanks nat@.  It works.
autoconfig succeeded and audioplay(1) also worked.
Please commit it.

# 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.

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>

At Fri, 28 Jul 2017 09:58:37 +1000,
Nathanial Sloss wrote:
> Hi,
> 
> Please try the attached patch for vs(4) - It should auto configure now.
> 
> You'll need current sources from 20170728 with the changes to auconv with 
> null_filter.
> 
> NetBSD-8 is yet to be pulled up.
> 
> If the patch works - I'll commit it.
> 
> Best regards,
> 
> Nat
> 
> On Sun, 9 Jul 2017 22:52:46 Tetsuya Isaki wrote:
> > At Sun, 25 Jun 2017 02:47:28 +0000,
> > 
> > > Module Name:	src
> > > Committed By:	nat
> > > Date:		Sun Jun 25 02:47:28 UTC 2017
> > > 
> > > Modified Files:
> > > 	src/sys/dev: audio.c
> > > 
> > > Log Message:
> > > Check validbits against precision in vchan_autoconfig.  At present
> > > validbits != precision is not supported.
> > > 
> > > This change will most likely break autoconfig on vs(4), for these
> > > machines the parameters can be set to the paramaters reported at attach
> > > time via sysctl.
> > 
> > Do you have any plan to revive it?
> > 
> > Thanks,
> > ---
> > Tetsuya Isaki <isaki%pastel-flower.jp@localhost / isaki%NetBSD.org@localhost>
> [2 vs.c.diff <text/x-patch; ISO-8859-1 (7bit)>]
> Index: vs.c
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/x68k/dev/vs.c,v
> retrieving revision 1.39
> diff -u -p -r1.39 vs.c
> --- vs.c	9 Jul 2017 12:49:26 -0000	1.39
> +++ vs.c	27 Jul 2017 23:45:17 -0000
> @@ -160,6 +160,8 @@ struct {
>  
>  #define NUM_RATE	(sizeof(vs_l2r)/sizeof(vs_l2r[0]))
>  
> +extern stream_filter_factory_t null_filter;
> +
>  static int
>  vs_match(device_t parent, cfdata_t cf, void *aux)
>  {
> @@ -405,6 +407,12 @@ vs_set_params(void *hdl, int setmode, in
>  	pfil->prepend(pfil, msm6258_slinear16_to_adpcm, play);
>  	rfil->prepend(rfil, msm6258_adpcm_to_slinear16, play);
>  
> +	play->validbits = 16;
> +	play->precision = 16;
> +
> +	pfil->prepend(pfil, null_filter, play);
> +	rfil->prepend(rfil, null_filter, play);
> +
>  	sc->sc_current.prate = rate;
>  	sc->sc_current.rrate = rate;
>  


Home | Main Index | Thread Index | Old Index