tech-kern archive

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

Re: Where's f_audioctx set?

On Tue, 13 Jul 2021, Mouse wrote:

However, the KASSERT, combined with AUDIO_SETINFO doing something,
indicates that it clearly is getting set.  So, I'm obviously missing


I had need to look into the audio code some time back, so I think I can
explain this:

audio_open() in audio.c:

1. fills audio_file_t *af;
2. calls fd_allocfile(&fp, &fd);
3. does fd_clone() with `af' as last param;
4. fd_clone() does fp->f_data = af;
5. f_data is just f_undata.fd_data

And, since f_undata is a union, step 4 sets fd_audioctx.


Home | Main Index | Thread Index | Old Index