SND_HDA_BUILD_PCMS

Section: (9)
Updated: 09 October 2005
Index Return to Main Contents

 

NAME

snd_hda_build_pcms - build PCM information  

SYNOPSIS

"SYNOPSIS"

int snd_hda_build_pcms (struct hda_bus * bus);  

ARGUMENTS

bus
the BUS
 

DESCRIPTION

Create PCM information for each codec included in the bus.

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.

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.

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.

This function returns 0 if successfull, or a negative error code.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 00:02:50 GMT, October 09, 2005