.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "SND_HDA_BUILD_PCMS" "9" "09 October 2005" "" ""
.SH NAME
snd_hda_build_pcms \- build PCM information
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int snd_hda_build_pcms (struct hda_bus * \fIbus\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIbus\fB\fR
the BUS
.SH "DESCRIPTION"
.PP
Create PCM information for each codec included in the bus.
.PP
The build_pcms codec patch is requested to set up codec->num_pcms and
codec->pcm_info properly. The array is referred by the top-level driver
to create its PCM instances.
The allocated codec->pcm_info should be released in codec->patch_ops.free
callback.
.PP
At least, substreams, channels_min and channels_max must be filled for
each stream. substreams = 0 indicates that the stream doesn't exist.
When rates and/or formats are zero, the supported values are queried
from the given nid. The nid is used also by the default ops.prepare
and ops.cleanup callbacks.
.PP
The driver needs to call ops.open in its open callback. Similarly,
ops.close is supposed to be called in the close callback.
ops.prepare should be called in the prepare or hw_params callback
with the proper parameters for set up.
ops.cleanup should be called in hw_free for clean up of streams.
.PP
This function returns 0 if successfull, or a negative error code.