diff options
-rw-r--r-- | src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules | 1 | ||||
-rw-r--r-- | src/modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf | 85 | ||||
-rw-r--r-- | src/modules/module-udev-detect.c | 2 | ||||
-rw-r--r-- | src/modules/x11/module-x11-xsmp.c | 2 | ||||
-rw-r--r-- | src/pulse/def.h | 3 | ||||
-rw-r--r-- | src/pulse/introspect.h | 2 | ||||
-rw-r--r-- | src/pulse/proplist.h | 2 | ||||
-rw-r--r-- | src/pulse/simple.h | 4 | ||||
-rw-r--r-- | src/pulse/stream.h | 4 | ||||
-rw-r--r-- | src/pulse/thread-mainloop.c | 1 | ||||
-rw-r--r-- | src/pulse/volume.h | 6 | ||||
-rw-r--r-- | src/pulsecore/asyncq.h | 5 | ||||
-rw-r--r-- | src/pulsecore/aupdate.h | 2 | ||||
-rw-r--r-- | src/pulsecore/cpu-arm.c | 6 | ||||
-rw-r--r-- | src/pulsecore/memblockq.h | 2 | ||||
-rw-r--r-- | src/pulsecore/rtpoll.c | 23 |
16 files changed, 129 insertions, 21 deletions
diff --git a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules index ea1a2fed..b8e88d0f 100644 --- a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules +++ b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules @@ -22,5 +22,6 @@ KERNEL!="card*", GOTO="pulseaudio_end" SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1978", ENV{PULSE_PROFILE_SET}="native-instruments-audio8dj.conf" SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="0839", ENV{PULSE_PROFILE_SET}="native-instruments-audio4dj.conf" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0763", ATTRS{idProduct}=="2012", ENV{PULSE_PROFILE_SET}="maudio-fasttrack-pro.conf" LABEL="pulseaudio_end" diff --git a/src/modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf b/src/modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf new file mode 100644 index 00000000..75f51121 --- /dev/null +++ b/src/modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf @@ -0,0 +1,85 @@ +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# PulseAudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with PulseAudio; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + +; M-Audio FastTrack Pro +; +; This card has one duplex stereo channel called A and an additional +; stereo output channel called B. +; +; We knowingly only define a subset of the theoretically possible +; mapping combinations as profiles here. +; +; See default.conf for an explanation on the directives used here. + +[General] +auto-profiles = no + +[Mapping analog-stereo-a-output] +description = Analog Stereo Channel A +device-strings = hw:%f,0,0 +channel-map = left,right +direction = output + +[Mapping analog-stereo-a-input] +description = Analog Stereo Channel A +device-strings = hw:%f,0,0 +channel-map = left,right +direction = input + +[Mapping analog-stereo-b-output] +description = Analog Stereo Channel B +device-strings = hw:%f,1,0 +channel-map = left,right +direction = output + +[Profile output:analog-stereo-all+input:analog-stereo-all] +description = Analog Stereo Duplex Channel A, Analog Stereo output Channel B +output-mappings = analog-stereo-a-output analog-stereo-b-output +input-mappings = analog-stereo-a-input +priority = 100 +skip-probe = yes + +[Profile output:analog-stereo-a-output+input:analog-stereo-a-input] +description = Analog Stereo Duplex Channel A +output-mappings = analog-stereo-a-output +input-mappings = analog-stereo-a-input +priority = 40 +skip-probe = yes + +[Profile output:analog-stereo-b+input:analog-stereo-b] +description = Analog Stereo Output Channel B +output-mappings = analog-stereo-b-output +input-mappings = +priority = 50 +skip-probe = yes + +[Profile output:analog-stereo-a] +description = Analog Stereo Output Channel A +output-mappings = analog-stereo-a-output +priority = 5 +skip-probe = yes + +[Profile output:analog-stereo-b] +description = Analog Stereo Output Channel B +output-mappings = analog-stereo-b-output +priority = 6 +skip-probe = yes + +[Profile input:analog-stereo-a] +description = Analog Stereo Input Channel A +input-mappings = analog-stereo-a-input +priority = 2 +skip-probe = yes diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c index a12f7c93..f17695b3 100644 --- a/src/modules/module-udev-detect.c +++ b/src/modules/module-udev-detect.c @@ -366,7 +366,7 @@ static void process_device(struct userdata *u, struct udev_device *dev) { return; } - if ((ff = udev_device_get_property_value(dev, "SOUND_FORM_FACTOR")) && + if ((ff = udev_device_get_property_value(dev, "SOUND_CLASS")) && pa_streq(ff, "modem")) { pa_log_debug("Ignoring %s, because it is a modem.", udev_device_get_devpath(dev)); return; diff --git a/src/modules/x11/module-x11-xsmp.c b/src/modules/x11/module-x11-xsmp.c index 28fd373a..47a4e93e 100644 --- a/src/modules/x11/module-x11-xsmp.c +++ b/src/modules/x11/module-x11-xsmp.c @@ -129,7 +129,7 @@ int pa__init(pa_module*m) { pa_assert(m); if (ice_in_use) { - pa_log("module-x11-xsmp may no be loaded twice."); + pa_log("module-x11-xsmp may not be loaded twice."); return -1; } diff --git a/src/pulse/def.h b/src/pulse/def.h index 30a076d5..82106ef8 100644 --- a/src/pulse/def.h +++ b/src/pulse/def.h @@ -63,6 +63,7 @@ static inline int PA_CONTEXT_IS_GOOD(pa_context_state_t x) { #define PA_CONTEXT_SETTING_NAME PA_CONTEXT_SETTING_NAME #define PA_CONTEXT_READY PA_CONTEXT_READY #define PA_CONTEXT_FAILED PA_CONTEXT_FAILED +#define PA_CONTEXT_TERMINATED PA_CONTEXT_TERMINATED #define PA_CONTEXT_IS_GOOD PA_CONTEXT_IS_GOOD /** \endcond */ @@ -351,7 +352,7 @@ typedef struct pa_buffer_attr { * that may be. Initialize to 0 to enable manual start/stop * control of the stream. This means that playback will not stop * on underrun and playback will not start automatically. Instead - * pa_stream_corked() needs to be called explicitly. If you set + * pa_stream_cork() needs to be called explicitly. If you set * this value to 0 you should also set PA_STREAM_START_CORKED. */ uint32_t minreq; diff --git a/src/pulse/introspect.h b/src/pulse/introspect.h index 68cfc874..f9d22b29 100644 --- a/src/pulse/introspect.h +++ b/src/pulse/introspect.h @@ -460,7 +460,7 @@ typedef struct pa_card_info { pa_proplist *proplist; /**< Property list */ } pa_card_info; -/** Callback prototype for pa_context_get_card_info() and friends \since 0.9.15 */ +/** Callback prototype for pa_context_get_card_info_...() \since 0.9.15 */ typedef void (*pa_card_info_cb_t) (pa_context *c, const pa_card_info*i, int eol, void *userdata); /** Get information about a card by its index \since 0.9.15 */ diff --git a/src/pulse/proplist.h b/src/pulse/proplist.h index aae05346..e3f0af07 100644 --- a/src/pulse/proplist.h +++ b/src/pulse/proplist.h @@ -325,7 +325,7 @@ void pa_proplist_update(pa_proplist *p, pa_update_mode_t mode, pa_proplist *othe * specified key name. \since 0.9.11 */ int pa_proplist_unset(pa_proplist *p, const char *key); -/** Similar to pa_proplist_remove() but takes an array of keys to +/** Similar to pa_proplist_unset() but takes an array of keys to * remove. The array should be terminated by a NULL pointer. Return -1 * on failure, otherwise the number of entries actually removed (which * might even be 0, if there where no matching entries to diff --git a/src/pulse/simple.h b/src/pulse/simple.h index 6f1ba414..b1f65374 100644 --- a/src/pulse/simple.h +++ b/src/pulse/simple.h @@ -82,8 +82,8 @@ * * \li pa_simple_drain() - Will wait for all sent data to finish playing. * \li pa_simple_flush() - Will throw away all data currently in buffers. - * \li pa_simple_get_playback_latency() - Will return the total latency of - * the playback pipeline. + * \li pa_simple_get_latency() - Will return the total latency of + * the playback pipeline. * * \section cleanup_sec Cleanup * diff --git a/src/pulse/stream.h b/src/pulse/stream.h index bc54a118..b9057885 100644 --- a/src/pulse/stream.h +++ b/src/pulse/stream.h @@ -289,7 +289,7 @@ * issued on the others. * * To synchronize a stream to another, just pass the "master" stream - * as last argument to pa_stream_connect_playack(). To make sure that + * as last argument to pa_stream_connect_playback(). To make sure that * the freshly created stream doesn't start playback right-away, make * sure to pass PA_STREAM_START_CORKED and - after all streams have * been created - uncork them all with a single call to @@ -716,7 +716,7 @@ pa_operation *pa_stream_set_buffer_attr(pa_stream *s, const pa_buffer_attr *attr /** Change the stream sampling rate during playback. You need to pass * PA_STREAM_VARIABLE_RATE in the flags parameter of - * pa_stream_connect() if you plan to use this function. Only valid + * pa_stream_connect_...() if you plan to use this function. Only valid * after the stream has been connected successfully and if the server * is at least PulseAudio 0.9.8. \since 0.9.8 */ pa_operation *pa_stream_update_sample_rate(pa_stream *s, uint32_t rate, pa_stream_success_cb_t cb, void *userdata); diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c index 14ed9264..16934044 100644 --- a/src/pulse/thread-mainloop.c +++ b/src/pulse/thread-mainloop.c @@ -116,6 +116,7 @@ pa_threaded_mainloop *pa_threaded_mainloop_new(void) { pa_mainloop_set_poll_func(m->real_mainloop, poll_func, m->mutex); m->n_waiting = 0; + m->n_waiting_for_accept = 0; return m; } diff --git a/src/pulse/volume.h b/src/pulse/volume.h index ded4422e..185c3419 100644 --- a/src/pulse/volume.h +++ b/src/pulse/volume.h @@ -149,7 +149,7 @@ pa_cvolume* pa_cvolume_set(pa_cvolume *a, unsigned channels, pa_volume_t v); char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c); /** Maximum length of the strings returned by - * pa_cvolume_snprint_dB(). Please note that this value can change with + * pa_sw_cvolume_snprint_dB(). Please note that this value can change with * any release without warning and without being considered API or ABI * breakage. You should not use this definition anywhere where it * might become part of an ABI. \since 0.9.13 */ @@ -169,7 +169,7 @@ char *pa_sw_cvolume_snprint_dB(char *s, size_t l, const pa_cvolume *c); char *pa_volume_snprint(char *s, size_t l, pa_volume_t v); /** Maximum length of the strings returned by - * pa_volume_snprint_dB(). Please note that this value can change with + * pa_sw_volume_snprint_dB(). Please note that this value can change with * any release without warning and without being considered API or ABI * breakage. You should not use this definition anywhere where it * might become part of an ABI. \since 0.9.15 */ @@ -268,7 +268,7 @@ double pa_sw_volume_to_linear(pa_volume_t v) PA_GCC_CONST; #ifdef INFINITY #define PA_DECIBEL_MININFTY ((double) -INFINITY) #else -/** This floor value is used as minus infinity when using pa_volume_{to,from}_dB(). */ +/** This floor value is used as minus infinity when using pa_sw_volume_to_dB() / pa_sw_volume_from_dB(). */ #define PA_DECIBEL_MININFTY ((double) -200.0) #endif diff --git a/src/pulsecore/asyncq.h b/src/pulsecore/asyncq.h index e6847ab8..47ccbf03 100644 --- a/src/pulsecore/asyncq.h +++ b/src/pulsecore/asyncq.h @@ -48,8 +48,9 @@ void pa_asyncq_free(pa_asyncq* q, pa_free_cb_t free_cb); void* pa_asyncq_pop(pa_asyncq *q, pa_bool_t wait); int pa_asyncq_push(pa_asyncq *q, void *p, pa_bool_t wait); -/* Similar to pa_asyncq_push(), but if the queue is full, postpone it - * locally and delay until pa_asyncq_before_poll_post() */ +/* Similar to pa_asyncq_push(), but if the queue is full, postpone the + * appending of the item locally and delay until + * pa_asyncq_before_poll_post() is called. */ void pa_asyncq_post(pa_asyncq*l, void *p); /* For the reading side */ diff --git a/src/pulsecore/aupdate.h b/src/pulsecore/aupdate.h index fb38ffa2..48871126 100644 --- a/src/pulsecore/aupdate.h +++ b/src/pulsecore/aupdate.h @@ -39,7 +39,7 @@ void pa_aupdate_write_end(pa_aupdate *a); /* Will return 0, or 1, depending which copy of the data the caller * should modify. Each time called this will return the opposite of - * the previous pa_aupdate_write_begin()/pa_aupdate_write_swap() + * the previous pa_aupdate_write_begin() / pa_aupdate_write_swap() * call. Should only be called between pa_aupdate_write_begin() and * pa_aupdate_write_end() */ unsigned pa_aupdate_write_swap(pa_aupdate *a); diff --git a/src/pulsecore/cpu-arm.c b/src/pulsecore/cpu-arm.c index 6bb2eadd..bf632f7a 100644 --- a/src/pulsecore/cpu-arm.c +++ b/src/pulsecore/cpu-arm.c @@ -30,6 +30,7 @@ #include <fcntl.h> #include <pulse/xmalloc.h> +#include <pulsecore/core-util.h> #include <pulsecore/log.h> #include "cpu-arm.h" @@ -67,7 +68,7 @@ static char *get_cpuinfo(void) { return NULL; } - if ((n = pa_read(fd, cpuinfo, MAX_BUFFER-1)) < 0) { + if ((n = pa_read(fd, cpuinfo, MAX_BUFFER-1, NULL)) < 0) { pa_xfree(cpuinfo); pa_close(fd); return NULL; @@ -105,7 +106,8 @@ void pa_cpu_init_arm (void) { } /* get the CPU features */ if ((line = get_cpuinfo_line (cpuinfo, "Features"))) { - char *state = NULL, *current; + const char *state = NULL; + char *current; while ((current = pa_split_spaces (line, &state))) { if (!strcmp (current, "vfp")) diff --git a/src/pulsecore/memblockq.h b/src/pulsecore/memblockq.h index 587c364b..b756549a 100644 --- a/src/pulsecore/memblockq.h +++ b/src/pulsecore/memblockq.h @@ -165,7 +165,7 @@ void pa_memblockq_set_silence(pa_memblockq *memblockq, pa_memchunk *silence); void pa_memblockq_apply_attr(pa_memblockq *memblockq, const pa_buffer_attr *a); void pa_memblockq_get_attr(pa_memblockq *bq, pa_buffer_attr *a); -/* Call pa_memchunk_willneed() for every chunk in the queue from the current read pointer to the end */ +/* Call pa_memchunk_will_need() for every chunk in the queue from the current read pointer to the end */ void pa_memblockq_willneed(pa_memblockq *bq); /* Check whether the memblockq is completely empty, i.e. no data diff --git a/src/pulsecore/rtpoll.c b/src/pulsecore/rtpoll.c index 83993f02..2ef78736 100644 --- a/src/pulsecore/rtpoll.c +++ b/src/pulsecore/rtpoll.c @@ -42,6 +42,7 @@ #include <pulsecore/core-util.h> #include <pulsecore/winsock.h> #include <pulsecore/ratelimit.h> +#include <pulse/rtclock.h> #include "rtpoll.h" @@ -212,6 +213,10 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait_op) { pa_assert(p); pa_assert(!p->running); +#ifdef DEBUG_TIMING + pa_log("rtpoll_run"); +#endif + p->running = TRUE; p->timer_elapsed = FALSE; @@ -225,13 +230,19 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait_op) { if (!i->work_cb) continue; - if (p->quit) + if (p->quit) { +#ifdef DEBUG_TIMING + pa_log("rtpoll finish"); +#endif goto finish; + } if ((k = i->work_cb(i)) != 0) { if (k < 0) r = k; - +#ifdef DEBUG_TIMING + pa_log("rtpoll finish"); +#endif goto finish; } } @@ -263,7 +274,9 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait_op) { if (k < 0) r = k; - +#ifdef DEBUG_TIMING + pa_log("rtpoll finish"); +#endif goto finish; } } @@ -287,6 +300,10 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait_op) { pa_usec_t now = pa_rtclock_now(); p->awake = now - p->timestamp; p->timestamp = now; + if (!wait_op || p->quit || p->timer_enabled) + pa_log("poll timeout: %d ms ",(int) ((timeout.tv_sec*1000) + (timeout.tv_usec / 1000))); + else + pa_log("poll timeout is ZERO"); } #endif |