Lines Matching refs:err
57 int err; in set_hw_params() local
62 err = snd_pcm_hw_params_any(pcm, hw_params); in set_hw_params()
63 if (err < 0) in set_hw_params()
64 return err; in set_hw_params()
65 err = snd_pcm_hw_params_set_access(pcm, hw_params, access); in set_hw_params()
66 if (err < 0) in set_hw_params()
67 return err; in set_hw_params()
68 err = snd_pcm_hw_params_set_format(pcm, hw_params, format); in set_hw_params()
69 if (err < 0) in set_hw_params()
70 return err; in set_hw_params()
72 err = snd_pcm_hw_params_set_subformat(pcm, hw_params, subformat); in set_hw_params()
73 if (err < 0) in set_hw_params()
74 return err; in set_hw_params()
76 err = snd_pcm_hw_params_set_channels(pcm, hw_params, channels); in set_hw_params()
77 if (err < 0) in set_hw_params()
78 return err; in set_hw_params()
79 err = INTERNAL(snd_pcm_hw_params_set_rate_near)(pcm, hw_params, rate, 0); in set_hw_params()
80 if (err < 0) in set_hw_params()
81 return err; in set_hw_params()
82 err = INTERNAL(snd_pcm_hw_params_set_buffer_time_near)(pcm, hw_params, buffer_time, NULL); in set_hw_params()
83 if (err < 0) in set_hw_params()
84 return err; in set_hw_params()
87 err = INTERNAL(snd_pcm_hw_params_set_periods_near)(pcm, hw_params, &periods, NULL); in set_hw_params()
88 if (err < 0) in set_hw_params()
89 return err; in set_hw_params()
93 err = INTERNAL(snd_pcm_hw_params_get_period_time)(hw_params, period_time, NULL); in set_hw_params()
94 if (err < 0) in set_hw_params()
95 return err; in set_hw_params()
98 err = snd_pcm_hw_params_set_period_time(pcm, hw_params, *period_time, 0); in set_hw_params()
99 if (err < 0) in set_hw_params()
100 return err; in set_hw_params()
104 err = snd_pcm_hw_params(pcm, hw_params); in set_hw_params()
105 if (err < 0) in set_hw_params()
106 return err; in set_hw_params()
114 int err; in set_sw_params() local
116 err = snd_pcm_sw_params_current(pcm, sw_params); in set_sw_params()
117 if (err < 0) in set_sw_params()
118 return err; in set_sw_params()
119 …err = snd_pcm_sw_params_set_start_threshold(pcm, sw_params, (pcm->buffer_size / pcm->period_size) … in set_sw_params()
120 if (err < 0) in set_sw_params()
121 return err; in set_sw_params()
122 err = snd_pcm_sw_params_set_avail_min(pcm, sw_params, pcm->period_size); in set_sw_params()
123 if (err < 0) in set_sw_params()
124 return err; in set_sw_params()
127 err = snd_pcm_sw_params_set_stop_threshold(pcm, sw_params, pcm->buffer_size); in set_sw_params()
130 err = snd_pcm_sw_params_set_stop_threshold(pcm, sw_params, pcm->boundary); in set_sw_params()
135 if (err < 0) in set_sw_params()
136 return err; in set_sw_params()
137 err = snd_pcm_sw_params(pcm, sw_params); in set_sw_params()
138 if (err < 0) in set_sw_params()
139 return err; in set_sw_params()
166 int err; in snd_spcm_init() local
177 err = set_buffer_time(latency, &buffer_time); in snd_spcm_init()
178 if (err < 0) in snd_spcm_init()
179 return err; in snd_spcm_init()
180 err = set_hw_params(pcm, &hw_params, in snd_spcm_init()
183 if (err < 0) in snd_spcm_init()
184 return err; in snd_spcm_init()
186 err = set_sw_params(pcm, &sw_params, xrun_type); in snd_spcm_init()
187 if (err < 0) in snd_spcm_init()
188 return err; in snd_spcm_init()
220 int err, i; in snd_spcm_init_duplex() local
239 err = set_buffer_time(latency, &xbuffer_time); in snd_spcm_init_duplex()
240 if (err < 0) in snd_spcm_init_duplex()
241 return err; in snd_spcm_init_duplex()
247 err = set_hw_params(pcms[i], &hw_params, in snd_spcm_init_duplex()
250 if (err < 0) in snd_spcm_init_duplex()
251 return err; in snd_spcm_init_duplex()
266 err = set_sw_params(pcms[i], &sw_params, xrun_type); in snd_spcm_init_duplex()
267 if (err < 0) in snd_spcm_init_duplex()
268 return err; in snd_spcm_init_duplex()