mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-16 14:28:34 +00:00
FS-9924: Removed extra space in source files
This commit is contained in:
1 parent
60d4e87487
commit
df1ab07ca4
455 files changed
+9699
-9698
No files matched your search
@@ -1,11 +1,11 @@
|
||||
//gcc -Wall -ggdb client.c -o client -lX11 -lpthread
|
||||
/*
|
||||
|
||||
Interactive client for the Skype API
|
||||
|
||||
Interactive client for the Skype API
|
||||
|
||||
USAGE: client [Xserver instance]
|
||||
|
||||
# ./client :103
|
||||
# ./client :103
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -435,8 +435,8 @@ static switch_status_t interface_exists(char *the_interface)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
State methods they get called when the state changes to the specific state
|
||||
/*
|
||||
State methods they get called when the state changes to the specific state
|
||||
returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
|
||||
so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
|
||||
*/
|
||||
@@ -2486,7 +2486,7 @@ private_t *find_available_skypopen_interface_rr(private_t *tech_pvt_calling)
|
||||
switch_mutex_lock(globals.mutex);
|
||||
|
||||
/* Fact is the real interface start from 1 */
|
||||
//XXX no, is just a convention, but you can have it start from 0. I do not, for aestetic reasons :-)
|
||||
//XXX no, is just a convention, but you can have it start from 0. I do not, for aestetic reasons :-)
|
||||
|
||||
for (i = 0; i < SKYPOPEN_MAX_INTERFACES; i++) {
|
||||
int interface_id;
|
||||
@@ -3384,7 +3384,7 @@ struct SkypopenHandles *skypopen_list_find(struct SkypopenList *list, struct Sky
|
||||
}
|
||||
#endif
|
||||
|
||||
// CLOUDTREE (THomas Hazel) - is there a capable freeswitch list?
|
||||
// CLOUDTREE (THomas Hazel) - is there a capable freeswitch list?
|
||||
int skypopen_list_size(struct SkypopenList *list)
|
||||
{
|
||||
return list->entries;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//indent -gnu -ts4 -br -brs -cdw -lp -ce -nbfda -npcs -nprs -npsl -nbbo -saf -sai -saw -cs -bbo -nhnl -nut -sob -l90
|
||||
//indent -gnu -ts4 -br -brs -cdw -lp -ce -nbfda -npcs -nprs -npsl -nbbo -saf -sai -saw -cs -bbo -nhnl -nut -sob -l90
|
||||
#include "skypiax.h"
|
||||
|
||||
/* LOCKS */
|
||||
@@ -95,13 +95,13 @@ const struct ast_channel_tech skypiax_tech = {
|
||||
#endif /* ASTERISK_VERSION_1_4 */
|
||||
};
|
||||
|
||||
/*! \brief fake skypiax_pvt structure values,
|
||||
/*! \brief fake skypiax_pvt structure values,
|
||||
* just for logging purposes */
|
||||
struct skypiax_pvt skypiax_log_struct = {
|
||||
.name = "none",
|
||||
};
|
||||
|
||||
/*! \brief Default skypiax_pvt structure values,
|
||||
/*! \brief Default skypiax_pvt structure values,
|
||||
* used by skypiax_mkif to initialize the interfaces */
|
||||
struct skypiax_pvt skypiax_default = {
|
||||
.interface_state = SKYPIAX_STATE_DOWN,
|
||||
@@ -121,14 +121,14 @@ struct skypiax_pvt skypiax_default = {
|
||||
.skypiax_dir_entry_extension_prefix = 6,
|
||||
};
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* \brief PVT structure for a skypiax interface (channel), created by skypiax_mkif
|
||||
*/
|
||||
struct skypiax_pvt *skypiax_iflist = NULL;
|
||||
|
||||
#ifdef ASTERISK_VERSION_1_6
|
||||
struct ast_cli_entry myclis[] = {
|
||||
/*
|
||||
/*
|
||||
* CLI do not works since some time on 1.6, they changed the CLI mechanism
|
||||
*/
|
||||
#if 0
|
||||
@@ -286,7 +286,7 @@ int skypiax_indicate(struct ast_channel *c, int cond, const void *data, size_t d
|
||||
return res;
|
||||
}
|
||||
|
||||
/*! \brief PBX interface function -build skypiax pvt structure
|
||||
/*! \brief PBX interface function -build skypiax pvt structure
|
||||
* skypiax calls initiated by the PBX arrive here */
|
||||
struct ast_channel *skypiax_request(const char *type, int format, void *data, int *cause)
|
||||
{
|
||||
@@ -584,7 +584,7 @@ struct ast_frame *skypiax_read(struct ast_channel *c)
|
||||
return &f;
|
||||
}
|
||||
|
||||
/*! \brief Initiate skypiax call from PBX
|
||||
/*! \brief Initiate skypiax call from PBX
|
||||
* used from the dial() application
|
||||
*/
|
||||
int skypiax_originate_call(struct ast_channel *c, char *idest, int timeout)
|
||||
@@ -788,7 +788,7 @@ struct ast_channel *skypiax_new(struct skypiax_pvt *p, int state, char *context)
|
||||
* \brief Load the module into Asterisk and start its threads
|
||||
*
|
||||
* This function register the module into Asterisk,
|
||||
* create the interfaces for the channels,
|
||||
* create the interfaces for the channels,
|
||||
* start the auxiliary threads for the interfaces,
|
||||
* then start a monitor thread. The monitor thread
|
||||
* will signal Asterisk when an interface receive a call.
|
||||
@@ -901,7 +901,7 @@ int load_module(void)
|
||||
* \brief Unload the module from Asterisk and shutdown its threads
|
||||
*
|
||||
* This function unregister the module from Asterisk,
|
||||
* destroy the interfaces for the channels,
|
||||
* destroy the interfaces for the channels,
|
||||
* shutdown the auxiliary threads for the interfaces,
|
||||
* then shutdown its monitor thread.
|
||||
*
|
||||
@@ -1363,9 +1363,9 @@ int skypiax_restart_monitor(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief The skypiax monitoring thread
|
||||
/*! \brief The skypiax monitoring thread
|
||||
* \note This thread monitors all the skypiax interfaces that are not in a call
|
||||
* (and thus do not have a separate thread) indefinitely
|
||||
* (and thus do not have a separate thread) indefinitely
|
||||
* */
|
||||
void *skypiax_do_monitor(void *data)
|
||||
{
|
||||
@@ -1439,7 +1439,7 @@ void *skypiax_do_monitor(void *data)
|
||||
|
||||
/* If there are errors... */
|
||||
if (res < 0) {
|
||||
if (errno == EINTR) /* EINTR is just the select
|
||||
if (errno == EINTR) /* EINTR is just the select
|
||||
being interrupted by a SIGURG, or so */
|
||||
continue;
|
||||
else {
|
||||
@@ -1483,10 +1483,10 @@ void *skypiax_do_monitor(void *data)
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Initialize the soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces)
|
||||
* \brief Initialize the soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces)
|
||||
* \param p the skypiax_pvt of the interface
|
||||
*
|
||||
* This function initialize the soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces). It simply pass its parameters to the right function for the sound system for which has been compiled, eg. alsa_init for ALSA, oss_init for OSS, winmm_init for Windows Multimedia, etc and return the result
|
||||
* This function initialize the soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces). It simply pass its parameters to the right function for the sound system for which has been compiled, eg. alsa_init for ALSA, oss_init for OSS, winmm_init for Windows Multimedia, etc and return the result
|
||||
*
|
||||
* \return zero on success, -1 on error.
|
||||
*/
|
||||
@@ -1497,7 +1497,7 @@ int skypiax_sound_init(struct skypiax_pvt *p)
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Shutdown the soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces)
|
||||
* \brief Shutdown the soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces)
|
||||
* \param p the skypiax_pvt of the interface
|
||||
*
|
||||
* This function shutdown the soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces). It simply pass its parameters to the right function for the sound system for which has been compiled, eg. alsa_shutdown for ALSA, oss_shutdown for OSS, winmm_shutdown for Windows Multimedia, etc and return the result
|
||||
@@ -2035,7 +2035,7 @@ int skypiax_console_skypiax_dir_import(int fd, int argc, char *argv[])
|
||||
|
||||
int friends_count = 0;
|
||||
while (p->skype_friends[0] == '\0') {
|
||||
/* FIXME needs a timeout, can't wait forever!
|
||||
/* FIXME needs a timeout, can't wait forever!
|
||||
* eg. when skype is running but not connected! */
|
||||
usleep(100);
|
||||
friends_count++;
|
||||
@@ -2063,9 +2063,9 @@ int skypiax_console_skypiax_dir_import(int fd, int argc, char *argv[])
|
||||
* So, we have the Skype username (the HANDLE, I think is called).
|
||||
* But we want to call the names we see in the Skype contact list
|
||||
* So, let's check the DISPLAYNAME (the end user modified contact name)
|
||||
* Then, we check the FULLNAME (that appears as it was the DISPLAYNAME
|
||||
* Then, we check the FULLNAME (that appears as it was the DISPLAYNAME
|
||||
* if the end user has not modify it)
|
||||
* If we still have neither DISPLAYNAME nor FULLNAME, we'll use the
|
||||
* If we still have neither DISPLAYNAME nor FULLNAME, we'll use the
|
||||
* Skipe username (the HANDLE)
|
||||
*/
|
||||
|
||||
@@ -2074,7 +2074,7 @@ int skypiax_console_skypiax_dir_import(int fd, int argc, char *argv[])
|
||||
skypiax_signaling_write(p, msg_to_skype);
|
||||
int displayname_count = 0;
|
||||
while (p->skype_displayname[0] == '\0') {
|
||||
/* FIXME needs a timeout, can't wait forever!
|
||||
/* FIXME needs a timeout, can't wait forever!
|
||||
* eg. when skype is running but not connected! */
|
||||
usleep(100);
|
||||
displayname_count++;
|
||||
@@ -2090,9 +2090,9 @@ int skypiax_console_skypiax_dir_import(int fd, int argc, char *argv[])
|
||||
where2 = strstr(p->skype_displayname, "DISPLAYNAME ");
|
||||
if (where2) {
|
||||
|
||||
/* there can be some *smart* that makes a displayname
|
||||
/* there can be some *smart* that makes a displayname
|
||||
* that is different than first<space>last, */
|
||||
/* maybe initials, simbols, slashes,
|
||||
/* maybe initials, simbols, slashes,
|
||||
* something smartish... let's check */
|
||||
|
||||
if (where2[12] != '\0') {
|
||||
@@ -2153,7 +2153,7 @@ int skypiax_console_skypiax_dir_import(int fd, int argc, char *argv[])
|
||||
skypiax_signaling_write(p, msg_to_skype);
|
||||
int fullname_count = 0;
|
||||
while (p->skype_fullname[0] == '\0') {
|
||||
/* FIXME needs a timeout, can't wait forever!
|
||||
/* FIXME needs a timeout, can't wait forever!
|
||||
* eg. when skype is running but not connected! */
|
||||
usleep(100);
|
||||
fullname_count++;
|
||||
@@ -2167,7 +2167,7 @@ int skypiax_console_skypiax_dir_import(int fd, int argc, char *argv[])
|
||||
where2 = strstr(p->skype_fullname, "FULLNAME ");
|
||||
if (where2) {
|
||||
|
||||
/* there can be some *smart* that makes a fullname
|
||||
/* there can be some *smart* that makes a fullname
|
||||
* that is different than first<space>last, */
|
||||
/* maybe initials, simbols, slashes,
|
||||
* something smartish... let's check */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//indent -gnu -ts4 -br -brs -cdw -lp -ce -nbfda -npcs -nprs -npsl -nbbo -saf -sai -saw -cs -bbo -nhnl -nut -sob -l90
|
||||
//indent -gnu -ts4 -br -brs -cdw -lp -ce -nbfda -npcs -nprs -npsl -nbbo -saf -sai -saw -cs -bbo -nhnl -nut -sob -l90
|
||||
#ifndef _SKYPIAX_H_
|
||||
#define _SKYPIAX_H_
|
||||
|
||||
@@ -194,7 +194,7 @@ void ast_unregister_atexit(void (*func) (void)); /* in asterisk.h, but some aste
|
||||
#define SKYPIAX_FRAME_SIZE 160
|
||||
|
||||
/* SKYPIAX INTERNAL STRUCTS */
|
||||
/*!
|
||||
/*!
|
||||
* \brief structure for exchanging messages with the skype client
|
||||
*/
|
||||
#ifdef WANT_SKYPE_X11
|
||||
@@ -235,7 +235,7 @@ struct SkypiaxHandles {
|
||||
|
||||
#endif //WIN32
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* \brief PVT structure for a skypiax interface (channel), created by skypiax_mkif
|
||||
*/
|
||||
struct skypiax_pvt {
|
||||
|
||||
@@ -469,7 +469,7 @@ void snd_pcm_set_ops(struct snd_pcm *pcm, int direction, struct snd_pcm_ops *ops
|
||||
{
|
||||
struct snd_pcm_str *stream = &pcm->streams[direction];
|
||||
struct snd_pcm_substream *substream;
|
||||
|
||||
|
||||
for (substream = stream->substream; substream != NULL; substream = substream->next)
|
||||
substream->ops = ops;
|
||||
}
|
||||
@@ -485,7 +485,7 @@ EXPORT_SYMBOL(snd_pcm_set_ops);
|
||||
void snd_pcm_set_sync(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
|
||||
|
||||
runtime->sync.id32[0] = substream->pcm->card->number;
|
||||
runtime->sync.id32[1] = -1;
|
||||
runtime->sync.id32[2] = -1;
|
||||
@@ -498,7 +498,7 @@ EXPORT_SYMBOL(snd_pcm_set_sync);
|
||||
* Standard ioctl routine
|
||||
*/
|
||||
|
||||
static inline unsigned int div32(unsigned int a, unsigned int b,
|
||||
static inline unsigned int div32(unsigned int a, unsigned int b,
|
||||
unsigned int *r)
|
||||
{
|
||||
if (b == 0) {
|
||||
@@ -757,7 +757,7 @@ void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k,
|
||||
/**
|
||||
* snd_interval_ratnum - refine the interval value
|
||||
* @i: interval to refine
|
||||
* @rats_count: number of ratnum_t
|
||||
* @rats_count: number of ratnum_t
|
||||
* @rats: ratnum_t array
|
||||
* @nump: pointer to store the resultant numerator
|
||||
* @denp: pointer to store the resultant denominator
|
||||
@@ -811,7 +811,7 @@ int snd_interval_ratnum(struct snd_interval *i,
|
||||
}
|
||||
t.min = div_down(best_num, best_den);
|
||||
t.openmin = !!(best_num % best_den);
|
||||
|
||||
|
||||
result_num = best_num;
|
||||
result_diff = best_diff;
|
||||
result_den = best_den;
|
||||
@@ -922,7 +922,7 @@ static int snd_interval_ratden(struct snd_interval *i,
|
||||
}
|
||||
t.min = div_down(best_num, best_den);
|
||||
t.openmin = !!(best_num % best_den);
|
||||
|
||||
|
||||
best_num = best_den = best_diff = 0;
|
||||
for (k = 0; k < rats_count; ++k) {
|
||||
unsigned int num;
|
||||
@@ -1081,7 +1081,7 @@ int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond,
|
||||
constrs->rules_num++;
|
||||
va_end(args);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(snd_pcm_hw_rule_add);
|
||||
|
||||
@@ -1147,7 +1147,7 @@ EXPORT_SYMBOL(snd_pcm_hw_constraint_integer);
|
||||
* @var: hw_params variable to apply the range
|
||||
* @min: the minimal value
|
||||
* @max: the maximal value
|
||||
*
|
||||
*
|
||||
* Apply the min/max range constraint to an interval parameter.
|
||||
*/
|
||||
int snd_pcm_hw_constraint_minmax(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
|
||||
@@ -1169,7 +1169,7 @@ static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params,
|
||||
{
|
||||
struct snd_pcm_hw_constraint_list *list = rule->private;
|
||||
return snd_interval_list(hw_param_interval(params, rule->var), list->count, list->list, list->mask);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -1178,7 +1178,7 @@ static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params,
|
||||
* @cond: condition bits
|
||||
* @var: hw_params variable to apply the list constraint
|
||||
* @l: list
|
||||
*
|
||||
*
|
||||
* Apply the list of constraints to an interval parameter.
|
||||
*/
|
||||
int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime,
|
||||
@@ -1215,7 +1215,7 @@ static int snd_pcm_hw_rule_ratnums(struct snd_pcm_hw_params *params,
|
||||
* @var: hw_params variable to apply the ratnums constraint
|
||||
* @r: struct snd_ratnums constriants
|
||||
*/
|
||||
int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime,
|
||||
int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime,
|
||||
unsigned int cond,
|
||||
snd_pcm_hw_param_t var,
|
||||
struct snd_pcm_hw_constraint_ratnums *r)
|
||||
@@ -1248,7 +1248,7 @@ static int snd_pcm_hw_rule_ratdens(struct snd_pcm_hw_params *params,
|
||||
* @var: hw_params variable to apply the ratdens constraint
|
||||
* @r: struct snd_ratdens constriants
|
||||
*/
|
||||
int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime,
|
||||
int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime,
|
||||
unsigned int cond,
|
||||
snd_pcm_hw_param_t var,
|
||||
struct snd_pcm_hw_constraint_ratdens *r)
|
||||
@@ -1279,7 +1279,7 @@ static int snd_pcm_hw_rule_msbits(struct snd_pcm_hw_params *params,
|
||||
* @width: sample bits width
|
||||
* @msbits: msbits width
|
||||
*/
|
||||
int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime,
|
||||
int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime,
|
||||
unsigned int cond,
|
||||
unsigned int width,
|
||||
unsigned int msbits)
|
||||
@@ -1312,7 +1312,7 @@ int snd_pcm_hw_constraint_step(struct snd_pcm_runtime *runtime,
|
||||
snd_pcm_hw_param_t var,
|
||||
unsigned long step)
|
||||
{
|
||||
return snd_pcm_hw_rule_add(runtime, cond, var,
|
||||
return snd_pcm_hw_rule_add(runtime, cond, var,
|
||||
snd_pcm_hw_rule_step, (void *) step,
|
||||
var, -1);
|
||||
}
|
||||
@@ -1329,7 +1329,7 @@ static int snd_pcm_hw_rule_pow2(struct snd_pcm_hw_params *params, struct snd_pcm
|
||||
};
|
||||
return snd_interval_list(hw_param_interval(params, rule->var),
|
||||
ARRAY_SIZE(pow2_sizes), pow2_sizes, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_pcm_hw_constraint_pow2 - add a hw constraint power-of-2 rule
|
||||
@@ -1341,7 +1341,7 @@ int snd_pcm_hw_constraint_pow2(struct snd_pcm_runtime *runtime,
|
||||
unsigned int cond,
|
||||
snd_pcm_hw_param_t var)
|
||||
{
|
||||
return snd_pcm_hw_rule_add(runtime, cond, var,
|
||||
return snd_pcm_hw_rule_add(runtime, cond, var,
|
||||
snd_pcm_hw_rule_pow2, NULL,
|
||||
var, -1);
|
||||
}
|
||||
@@ -1459,8 +1459,8 @@ static int _snd_pcm_hw_param_first(struct snd_pcm_hw_params *params,
|
||||
* values > minimum. Reduce configuration space accordingly.
|
||||
* Return the minimum.
|
||||
*/
|
||||
int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm,
|
||||
struct snd_pcm_hw_params *params,
|
||||
int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm,
|
||||
struct snd_pcm_hw_params *params,
|
||||
snd_pcm_hw_param_t var, int *dir)
|
||||
{
|
||||
int changed = _snd_pcm_hw_param_first(params, var);
|
||||
@@ -1505,7 +1505,7 @@ static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params,
|
||||
* values < maximum. Reduce configuration space accordingly.
|
||||
* Return the maximum.
|
||||
*/
|
||||
int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm,
|
||||
int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm,
|
||||
struct snd_pcm_hw_params *params,
|
||||
snd_pcm_hw_param_t var, int *dir)
|
||||
{
|
||||
@@ -1731,7 +1731,7 @@ static int wait_for_avail_min(struct snd_pcm_substream *substream,
|
||||
case SNDRV_PCM_STATE_DRAINING:
|
||||
if (is_playback)
|
||||
err = -EPIPE;
|
||||
else
|
||||
else
|
||||
avail = 0; /* indicate draining */
|
||||
goto _endloop;
|
||||
case SNDRV_PCM_STATE_OPEN:
|
||||
@@ -1758,7 +1758,7 @@ static int wait_for_avail_min(struct snd_pcm_substream *substream,
|
||||
*availp = avail;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
static int snd_pcm_lib_write_transfer(struct snd_pcm_substream *substream,
|
||||
unsigned int hwoff,
|
||||
unsigned long data, unsigned int off,
|
||||
@@ -1777,12 +1777,12 @@ static int snd_pcm_lib_write_transfer(struct snd_pcm_substream *substream,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
typedef int (*transfer_f)(struct snd_pcm_substream *substream, unsigned int hwoff,
|
||||
unsigned long data, unsigned int off,
|
||||
snd_pcm_uframes_t size);
|
||||
|
||||
static snd_pcm_sframes_t snd_pcm_lib_write1(struct snd_pcm_substream *substream,
|
||||
static snd_pcm_sframes_t snd_pcm_lib_write1(struct snd_pcm_substream *substream,
|
||||
unsigned long data,
|
||||
snd_pcm_uframes_t size,
|
||||
int nonblock,
|
||||
@@ -1955,7 +1955,7 @@ static int snd_pcm_lib_writev_transfer(struct snd_pcm_substream *substream,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
snd_pcm_sframes_t snd_pcm_lib_writev(struct snd_pcm_substream *substream,
|
||||
void __user **bufs,
|
||||
snd_pcm_uframes_t frames)
|
||||
@@ -1978,7 +1978,7 @@ snd_pcm_sframes_t snd_pcm_lib_writev(struct snd_pcm_substream *substream,
|
||||
|
||||
EXPORT_SYMBOL(snd_pcm_lib_writev);
|
||||
|
||||
static int snd_pcm_lib_read_transfer(struct snd_pcm_substream *substream,
|
||||
static int snd_pcm_lib_read_transfer(struct snd_pcm_substream *substream,
|
||||
unsigned int hwoff,
|
||||
unsigned long data, unsigned int off,
|
||||
snd_pcm_uframes_t frames)
|
||||
@@ -2109,7 +2109,7 @@ snd_pcm_sframes_t snd_pcm_lib_read(struct snd_pcm_substream *substream, void __u
|
||||
struct snd_pcm_runtime *runtime;
|
||||
int nonblock;
|
||||
int err;
|
||||
|
||||
|
||||
err = pcm_sanity_check(substream);
|
||||
if (err < 0)
|
||||
return err;
|
||||
@@ -2157,7 +2157,7 @@ static int snd_pcm_lib_readv_transfer(struct snd_pcm_substream *substream,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
snd_pcm_sframes_t snd_pcm_lib_readv(struct snd_pcm_substream *substream,
|
||||
void __user **bufs,
|
||||
snd_pcm_uframes_t frames)
|
||||
|
||||
@@ -159,7 +159,7 @@ char *snd_pcm_hw_param_names[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
|
||||
int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
unsigned int k;
|
||||
@@ -212,7 +212,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
|
||||
if (i->empty)
|
||||
printk("empty");
|
||||
else
|
||||
printk("%c%u %u%c",
|
||||
printk("%c%u %u%c",
|
||||
i->openmin ? '(' : '[', i->min,
|
||||
i->max, i->openmax ? ')' : ']');
|
||||
printk(" -> ");
|
||||
@@ -221,8 +221,8 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
|
||||
#ifdef RULES_DEBUG
|
||||
if (i->empty)
|
||||
printk("empty\n");
|
||||
else
|
||||
printk("%c%u %u%c\n",
|
||||
else
|
||||
printk("%c%u %u%c\n",
|
||||
i->openmin ? '(' : '[', i->min,
|
||||
i->max, i->openmax ? ')' : ']');
|
||||
#endif
|
||||
@@ -234,7 +234,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
|
||||
|
||||
for (k = 0; k < constrs->rules_num; k++)
|
||||
rstamps[k] = 0;
|
||||
for (k = 0; k <= SNDRV_PCM_HW_PARAM_LAST_INTERVAL; k++)
|
||||
for (k = 0; k <= SNDRV_PCM_HW_PARAM_LAST_INTERVAL; k++)
|
||||
vstamps[k] = (params->rmask & (1 << k)) ? 1 : 0;
|
||||
do {
|
||||
again = 0;
|
||||
@@ -264,7 +264,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
|
||||
if (i->empty)
|
||||
printk("empty");
|
||||
else
|
||||
printk("%c%u %u%c",
|
||||
printk("%c%u %u%c",
|
||||
i->openmin ? '(' : '[', i->min,
|
||||
i->max, i->openmax ? ')' : ']');
|
||||
}
|
||||
@@ -280,7 +280,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
|
||||
if (i->empty)
|
||||
printk("empty");
|
||||
else
|
||||
printk("%c%u %u%c",
|
||||
printk("%c%u %u%c",
|
||||
i->openmin ? '(' : '[', i->min,
|
||||
i->max, i->openmax ? ')' : ']');
|
||||
}
|
||||
@@ -658,7 +658,7 @@ static int snd_pcm_status_user(struct snd_pcm_substream *substream,
|
||||
{
|
||||
struct snd_pcm_status status;
|
||||
int res;
|
||||
|
||||
|
||||
memset(&status, 0, sizeof(status));
|
||||
res = snd_pcm_status(substream, &status);
|
||||
if (res < 0)
|
||||
@@ -673,7 +673,7 @@ static int snd_pcm_channel_info(struct snd_pcm_substream *substream,
|
||||
{
|
||||
struct snd_pcm_runtime *runtime;
|
||||
unsigned int channel;
|
||||
|
||||
|
||||
channel = info->channel;
|
||||
runtime = substream->runtime;
|
||||
//giovanni snd_pcm_stream_lock_irq(substream);
|
||||
@@ -694,7 +694,7 @@ static int snd_pcm_channel_info_user(struct snd_pcm_substream *substream,
|
||||
{
|
||||
struct snd_pcm_channel_info info;
|
||||
int res;
|
||||
|
||||
|
||||
if (copy_from_user(&info, _info, sizeof(info)))
|
||||
return -EFAULT;
|
||||
res = snd_pcm_channel_info(substream, &info);
|
||||
@@ -785,7 +785,7 @@ static int snd_pcm_action_single(struct action_ops *ops,
|
||||
int state)
|
||||
{
|
||||
int res;
|
||||
|
||||
|
||||
res = ops->pre_action(substream, state);
|
||||
if (res < 0)
|
||||
return res;
|
||||
@@ -1543,7 +1543,7 @@ static int snd_pcm_drop(struct snd_pcm_substream *substream)
|
||||
struct snd_pcm_runtime *runtime;
|
||||
struct snd_card *card;
|
||||
int result = 0;
|
||||
|
||||
|
||||
if (PCM_RUNTIME_CHECK(substream))
|
||||
return -ENXIO;
|
||||
runtime = substream->runtime;
|
||||
@@ -1779,7 +1779,7 @@ static int snd_pcm_hw_rule_rate(struct snd_pcm_hw_params *params,
|
||||
return snd_interval_list(hw_param_interval(params, rule->var),
|
||||
snd_pcm_known_rates.count,
|
||||
snd_pcm_known_rates.list, hw->rates);
|
||||
}
|
||||
}
|
||||
|
||||
static int snd_pcm_hw_rule_buffer_bytes_max(struct snd_pcm_hw_params *params,
|
||||
struct snd_pcm_hw_rule *rule)
|
||||
@@ -1792,7 +1792,7 @@ static int snd_pcm_hw_rule_buffer_bytes_max(struct snd_pcm_hw_params *params,
|
||||
t.openmax = 0;
|
||||
t.integer = 1;
|
||||
return snd_interval_refine(hw_param_interval(params, rule->var), &t);
|
||||
}
|
||||
}
|
||||
|
||||
int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
|
||||
{
|
||||
@@ -1819,98 +1819,98 @@ int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
|
||||
SNDRV_PCM_HW_PARAM_SAMPLE_BITS, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
|
||||
snd_pcm_hw_rule_sample_bits, NULL,
|
||||
SNDRV_PCM_HW_PARAM_FORMAT,
|
||||
SNDRV_PCM_HW_PARAM_FORMAT,
|
||||
SNDRV_PCM_HW_PARAM_SAMPLE_BITS, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
|
||||
snd_pcm_hw_rule_div, NULL,
|
||||
SNDRV_PCM_HW_PARAM_FRAME_BITS, SNDRV_PCM_HW_PARAM_CHANNELS, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FRAME_BITS,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FRAME_BITS,
|
||||
snd_pcm_hw_rule_mul, NULL,
|
||||
SNDRV_PCM_HW_PARAM_SAMPLE_BITS, SNDRV_PCM_HW_PARAM_CHANNELS, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FRAME_BITS,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FRAME_BITS,
|
||||
snd_pcm_hw_rule_mulkdiv, (void*) 8,
|
||||
SNDRV_PCM_HW_PARAM_PERIOD_BYTES, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FRAME_BITS,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FRAME_BITS,
|
||||
snd_pcm_hw_rule_mulkdiv, (void*) 8,
|
||||
SNDRV_PCM_HW_PARAM_BUFFER_BYTES, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
|
||||
snd_pcm_hw_rule_div, NULL,
|
||||
SNDRV_PCM_HW_PARAM_FRAME_BITS, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
|
||||
snd_pcm_hw_rule_mulkdiv, (void*) 1000000,
|
||||
SNDRV_PCM_HW_PARAM_PERIOD_SIZE, SNDRV_PCM_HW_PARAM_PERIOD_TIME, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
|
||||
snd_pcm_hw_rule_mulkdiv, (void*) 1000000,
|
||||
SNDRV_PCM_HW_PARAM_BUFFER_SIZE, SNDRV_PCM_HW_PARAM_BUFFER_TIME, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIODS,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIODS,
|
||||
snd_pcm_hw_rule_div, NULL,
|
||||
SNDRV_PCM_HW_PARAM_BUFFER_SIZE, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
|
||||
snd_pcm_hw_rule_div, NULL,
|
||||
SNDRV_PCM_HW_PARAM_BUFFER_SIZE, SNDRV_PCM_HW_PARAM_PERIODS, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
|
||||
snd_pcm_hw_rule_mulkdiv, (void*) 8,
|
||||
SNDRV_PCM_HW_PARAM_PERIOD_BYTES, SNDRV_PCM_HW_PARAM_FRAME_BITS, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
|
||||
snd_pcm_hw_rule_muldivk, (void*) 1000000,
|
||||
SNDRV_PCM_HW_PARAM_PERIOD_TIME, SNDRV_PCM_HW_PARAM_RATE, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
|
||||
snd_pcm_hw_rule_mul, NULL,
|
||||
SNDRV_PCM_HW_PARAM_PERIOD_SIZE, SNDRV_PCM_HW_PARAM_PERIODS, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
|
||||
snd_pcm_hw_rule_mulkdiv, (void*) 8,
|
||||
SNDRV_PCM_HW_PARAM_BUFFER_BYTES, SNDRV_PCM_HW_PARAM_FRAME_BITS, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
|
||||
snd_pcm_hw_rule_muldivk, (void*) 1000000,
|
||||
SNDRV_PCM_HW_PARAM_BUFFER_TIME, SNDRV_PCM_HW_PARAM_RATE, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
|
||||
snd_pcm_hw_rule_muldivk, (void*) 8,
|
||||
SNDRV_PCM_HW_PARAM_PERIOD_SIZE, SNDRV_PCM_HW_PARAM_FRAME_BITS, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
|
||||
snd_pcm_hw_rule_muldivk, (void*) 8,
|
||||
SNDRV_PCM_HW_PARAM_BUFFER_SIZE, SNDRV_PCM_HW_PARAM_FRAME_BITS, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_TIME,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_TIME,
|
||||
snd_pcm_hw_rule_mulkdiv, (void*) 1000000,
|
||||
SNDRV_PCM_HW_PARAM_PERIOD_SIZE, SNDRV_PCM_HW_PARAM_RATE, -1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_TIME,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_TIME,
|
||||
snd_pcm_hw_rule_mulkdiv, (void*) 1000000,
|
||||
SNDRV_PCM_HW_PARAM_BUFFER_SIZE, SNDRV_PCM_HW_PARAM_RATE, -1);
|
||||
if (err < 0)
|
||||
@@ -1974,7 +1974,7 @@ int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream)
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
|
||||
snd_pcm_hw_rule_buffer_bytes_max, substream,
|
||||
SNDRV_PCM_HW_PARAM_BUFFER_BYTES, -1);
|
||||
if (err < 0)
|
||||
@@ -1988,7 +1988,7 @@ int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream)
|
||||
}
|
||||
|
||||
if (!(hw->rates & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS))) {
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
|
||||
snd_pcm_hw_rule_rate, hw,
|
||||
SNDRV_PCM_HW_PARAM_RATE, -1);
|
||||
if (err < 0)
|
||||
@@ -2424,7 +2424,7 @@ static int snd_pcm_hwsync(struct snd_pcm_substream *substream)
|
||||
snd_pcm_stream_unlock_irq(substream);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
static int snd_pcm_delay(struct snd_pcm_substream *substream,
|
||||
snd_pcm_sframes_t __user *res)
|
||||
{
|
||||
@@ -2464,7 +2464,7 @@ static int snd_pcm_delay(struct snd_pcm_substream *substream,
|
||||
err = -EFAULT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
static int snd_pcm_sync_ptr(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_sync_ptr __user *_sync_ptr)
|
||||
{
|
||||
@@ -2478,7 +2478,7 @@ static int snd_pcm_sync_ptr(struct snd_pcm_substream *substream,
|
||||
if (get_user(sync_ptr.flags, (unsigned __user *)&(_sync_ptr->flags)))
|
||||
return -EFAULT;
|
||||
if (copy_from_user(&sync_ptr.c.control, &(_sync_ptr->c.control), sizeof(struct snd_pcm_mmap_control)))
|
||||
return -EFAULT;
|
||||
return -EFAULT;
|
||||
status = runtime->status;
|
||||
control = runtime->control;
|
||||
if (sync_ptr.flags & SNDRV_PCM_SYNC_PTR_HWSYNC) {
|
||||
@@ -2509,7 +2509,7 @@ static int snd_pcm_tstamp(struct snd_pcm_substream *substream, int __user *_arg)
|
||||
{
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
int arg;
|
||||
|
||||
|
||||
if (get_user(arg, _arg))
|
||||
return -EFAULT;
|
||||
if (arg < 0 || arg > SNDRV_PCM_TSTAMP_TYPE_LAST)
|
||||
@@ -2519,7 +2519,7 @@ static int snd_pcm_tstamp(struct snd_pcm_substream *substream, int __user *_arg)
|
||||
runtime->tstamp_type = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int snd_pcm_common_ioctl1(struct file *file,
|
||||
struct snd_pcm_substream *substream,
|
||||
unsigned int cmd, void __user *arg)
|
||||
@@ -2781,7 +2781,7 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream,
|
||||
{
|
||||
mm_segment_t fs;
|
||||
int result;
|
||||
|
||||
|
||||
fs = snd_enter_user();
|
||||
switch (substream->stream) {
|
||||
case SNDRV_PCM_STREAM_PLAYBACK:
|
||||
@@ -3019,7 +3019,7 @@ static int snd_pcm_mmap_status_fault(struct vm_area_struct *area,
|
||||
{
|
||||
struct snd_pcm_substream *substream = area->vm_private_data;
|
||||
struct snd_pcm_runtime *runtime;
|
||||
|
||||
|
||||
if (substream == NULL)
|
||||
return VM_FAULT_SIGBUS;
|
||||
runtime = substream->runtime;
|
||||
@@ -3058,7 +3058,7 @@ static int snd_pcm_mmap_control_fault(struct vm_area_struct *area,
|
||||
{
|
||||
struct snd_pcm_substream *substream = area->vm_private_data;
|
||||
struct snd_pcm_runtime *runtime;
|
||||
|
||||
|
||||
if (substream == NULL)
|
||||
return VM_FAULT_SIGBUS;
|
||||
runtime = substream->runtime;
|
||||
@@ -3136,7 +3136,7 @@ static int snd_pcm_mmap_data_fault(struct vm_area_struct *area,
|
||||
unsigned long offset;
|
||||
struct page * page;
|
||||
size_t dma_bytes;
|
||||
|
||||
|
||||
if (substream == NULL)
|
||||
return VM_FAULT_SIGBUS;
|
||||
runtime = substream->runtime;
|
||||
@@ -3278,9 +3278,9 @@ EXPORT_SYMBOL(snd_pcm_mmap_data);
|
||||
static int snd_pcm_mmap(struct file *file, struct vm_area_struct *area)
|
||||
{
|
||||
struct snd_pcm_file * pcm_file;
|
||||
struct snd_pcm_substream *substream;
|
||||
struct snd_pcm_substream *substream;
|
||||
unsigned long offset;
|
||||
|
||||
|
||||
pcm_file = file->private_data;
|
||||
substream = pcm_file->substream;
|
||||
if (PCM_RUNTIME_CHECK(substream))
|
||||
|
||||
@@ -473,7 +473,7 @@ int skypopen_init_module(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* allocate the devices -- we can't have them static, as the number
|
||||
* can be specified at load time
|
||||
*/
|
||||
|
||||
@@ -29,16 +29,16 @@
|
||||
|
||||
|
||||
#if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 18)
|
||||
#define CENTOS_5
|
||||
#define CENTOS_5
|
||||
#define WANT_HRTIMER /* undef this only if you don't want to use High Resolution Timers (why?) */
|
||||
#endif /* CentOS 5.x */
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
|
||||
#define WANT_HRTIMER
|
||||
#define WANT_HRTIMER
|
||||
#endif /* HRTIMER */
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)
|
||||
#define WANT_DEFINE_SPINLOCK
|
||||
#define WANT_DEFINE_SPINLOCK
|
||||
#endif /* DEFINE_SPINLOCK */
|
||||
|
||||
#define SKYPOPEN_BLK 1920
|
||||
@@ -57,13 +57,13 @@ struct skypopen_dev {
|
||||
struct cdev cdev; /* Char device structure */
|
||||
wait_queue_head_t inq; /* read and write queues */
|
||||
wait_queue_head_t outq; /* read and write queues */
|
||||
#ifndef WANT_HRTIMER
|
||||
#ifndef WANT_HRTIMER
|
||||
struct timer_list timer_inq;
|
||||
struct timer_list timer_outq;
|
||||
#else// WANT_HRTIMER
|
||||
#else// WANT_HRTIMER
|
||||
struct hrtimer timer_inq;
|
||||
struct hrtimer timer_outq;
|
||||
#endif// WANT_HRTIMER
|
||||
#endif// WANT_HRTIMER
|
||||
int timer_inq_started;
|
||||
int timer_outq_started;
|
||||
int opened;
|
||||
|
||||
@@ -1391,13 +1391,13 @@ int skypopen_audio_init(private_t *tech_pvt)
|
||||
#ifdef WIN32
|
||||
|
||||
enum {
|
||||
SKYPECONTROLAPI_ATTACH_SUCCESS = 0, /* Client is successfully
|
||||
SKYPECONTROLAPI_ATTACH_SUCCESS = 0, /* Client is successfully
|
||||
attached and API window handle can be found
|
||||
in wParam parameter */
|
||||
SKYPECONTROLAPI_ATTACH_PENDING_AUTHORIZATION = 1, /* Skype has acknowledged
|
||||
connection request and is waiting
|
||||
for confirmation from the user. */
|
||||
/* The client is not yet attached
|
||||
/* The client is not yet attached
|
||||
* and should wait for SKYPECONTROLAPI_ATTACH_SUCCESS message */
|
||||
SKYPECONTROLAPI_ATTACH_REFUSED = 2, /* User has explicitly
|
||||
denied access to client */
|
||||
@@ -1405,8 +1405,8 @@ enum {
|
||||
at the moment.
|
||||
For example, this happens when no user
|
||||
is currently logged in. */
|
||||
/* Client should wait for
|
||||
* SKYPECONTROLAPI_ATTACH_API_AVAILABLE
|
||||
/* Client should wait for
|
||||
* SKYPECONTROLAPI_ATTACH_API_AVAILABLE
|
||||
* broadcast before making any further */
|
||||
/* connection attempts. */
|
||||
SKYPECONTROLAPI_ATTACH_API_AVAILABLE = 0x8001
|
||||
@@ -2080,7 +2080,7 @@ void *skypopen_do_skypeapi_thread_func(void *obj)
|
||||
}
|
||||
if (continue_is_broken) {
|
||||
XFlush(disp);
|
||||
skypopen_sleep(20000); //20 msec
|
||||
skypopen_sleep(20000); //20 msec
|
||||
WARNINGA("continue_is_broken\n", SKYPOPEN_P_LOG);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user