mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[ALSA] Remove unneeded read/write_size fields in proc text ops
Remove unneeded read/write_size fields in proc text ops. snd_info_set_text_ops() is fixed, too. Signed-off-by: Takashi Iwai <[email protected]>
This commit is contained in:
parent
7e4eeec8a3
commit
bf850204a7
61 changed files with 81 additions and 146 deletions
|
|
@ -5333,7 +5333,7 @@ struct _snd_pcm_runtime {
|
|||
<informalexample>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
snd_info_set_text_ops(entry, chip, read_size, my_proc_read);
|
||||
snd_info_set_text_ops(entry, chip, my_proc_read);
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
|
@ -5394,29 +5394,12 @@ struct _snd_pcm_runtime {
|
|||
<informalexample>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
entry->c.text.write_size = 256;
|
||||
entry->c.text.write = my_proc_write;
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The buffer size for read is set to 1024 implicitly by
|
||||
<function>snd_info_set_text_ops()</function>. It should suffice
|
||||
in most cases (the size will be aligned to
|
||||
<constant>PAGE_SIZE</constant> anyway), but if you need to handle
|
||||
very large text files, you can set it explicitly, too.
|
||||
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
entry->c.text.read_size = 65536;
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For the write callback, you can use
|
||||
<function>snd_info_get_line()</function> to get a text line, and
|
||||
|
|
|
|||
Loading…
Reference in a new issue