Ktam3874/pitx software guide – Kontron KTAM3874-pITX User Manual

Page 110

Advertising
background image

KTD-S0057-I

Page 106 Linux® Programming Examples (DebianTM)


KTAM3874/pITX Software Guide


snd_pcm_hw_params_alloca

(&hwparams);

snd_pcm_sw_params_alloca

(&swparams);

morehelp = 0;

while

(1)

{

int

c;

if ((c = getopt_long (argc, argv, "hD:r:c:f:b:p:m:o:vne", long_option, NULL)) < 0)

break;

switch

(c)

{

case

'h':

morehelp++;

break;

case

'D':

device = strdup (optarg);

break;

case

'r':

rate = atoi (optarg);

rate = rate < 4000 ? 4000 : rate;

rate = rate > 196000 ? 196000 : rate;

break;

case

'c':

channels = atoi (optarg);

channels = channels < 1 ? 1 : channels;

channels = channels > 2 ? 2 : channels;

break;

case

'f':

freq = atoi (optarg);

freq = freq < 50 ? 50 : freq;

freq = freq > 22000 ? 22000 : freq;

break;

case

'b':

buffer_time

=

atoi

(optarg);

buffer_time = buffer_time < 1000 ? 1000 : buffer_time;

buffer_time = buffer_time > 1000000 ? 1000000 : buffer_time;

break;

case

'p':

period_time

=

atoi

(optarg);

period_time = period_time < 1000 ? 1000 : period_time;

period_time = period_time > 1000000 ? 1000000 : period_time;

break;

case

'm':

for (method = 0; transfer_methods[method].name; method++)

if (! strcasecmp(transfer_methods[method].name, optarg))

break;

if (transfer_methods[method].name == NULL)

method = 0;

break;

Advertising
This manual is related to the following products: