Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | log: use pa_logl() instead of pa_log_level() | Lennart Poettering | 2009-04-19 | 1 | -1/+1 |
| | |||||
* | log: print file name only when we have it | Lennart Poettering | 2009-04-19 | 1 | -1/+1 |
| | |||||
* | object: keep refcount at 1 while destructing objects | Lennart Poettering | 2009-04-18 | 1 | -3/+6 |
| | |||||
* | core-util: handle EINTR already inside of pa_read/pa_write | Lennart Poettering | 2009-04-18 | 1 | -7/+32 |
| | |||||
* | core: when applying delay memblockq take monitored sink latency into account | Lennart Poettering | 2009-04-14 | 1 | -0/+19 |
| | |||||
* | core: use pa_{source|sink}_get_latency_within_thread() at one more place | Lennart Poettering | 2009-04-14 | 2 | -8/+2 |
| | |||||
* | core: introduce new 'reference' volume for sinks | Lennart Poettering | 2009-04-13 | 8 | -61/+90 |
| | | | | | | | | | | | | | | | The reference volume is to be used as reference volume for stored stream volumes. Previously if a new stream was created the relative volume was taken relatively to the virtual device volume. Due to the flat volume logic this could then be fed back to the virtual device volume. Repeating the whole story over and over would result in a device volume that would go lower, and lower and lower. This patch introduces a 'reference' volume for each sink which stays unmodified by stream volume changes even if flat volumes are used. It is only modified if the sink volumes are modified directly by the user. For further explanations see http://pulseaudio.org/wiki/InternalVolumes | ||||
* | proplist-util: use pa_session_id() instead of accessing ↵ | Lennart Poettering | 2009-04-13 | 1 | -5/+4 |
| | | | | 7b816367b01393ed3e3e650047d78f6e-1239640487.203609-1061245823 directly | ||||
* | core-util: filter utf8 in pa_machine_id() | Lennart Poettering | 2009-04-13 | 1 | -3/+6 |
| | |||||
* | core-util: add pa_session_id() | Lennart Poettering | 2009-04-13 | 2 | -0/+10 |
| | |||||
* | alsa: when printing warning about bogus data from alsa include snd_pcm_dump() | Lennart Poettering | 2009-04-10 | 1 | -0/+1 |
| | |||||
* | core: add a seperate fixed_latency field for sinks/sources with fixed latency | Lennart Poettering | 2009-04-10 | 7 | -28/+67 |
| | |||||
* | core: memory leak, fix ref counting when moving streams | Lennart Poettering | 2009-04-10 | 4 | -10/+38 |
| | |||||
* | dbus: memory leak, actually free dbus wrapper | Lennart Poettering | 2009-04-10 | 1 | -1/+2 |
| | |||||
* | dbus: drop pa_ prefix from static symbol | Lennart Poettering | 2009-04-10 | 1 | -7/+2 |
| | |||||
* | protocol-native: downgrade message if we receive pcm block for dead stream | Lennart Poettering | 2009-04-10 | 1 | -1/+1 |
| | |||||
* | protocol-native: print underrun message only once for each underrun | Lennart Poettering | 2009-04-10 | 1 | -1/+2 |
| | |||||
* | socket-server: memory leak, free machine id after use | Lennart Poettering | 2009-04-10 | 1 | -0/+1 |
| | |||||
* | dbus: memory leak, free pending calls | Lennart Poettering | 2009-04-10 | 1 | -2/+4 |
| | |||||
* | dbus: memory leak, free server id after use | Lennart Poettering | 2009-04-10 | 1 | -1/+4 |
| | |||||
* | introduce relative_volume field in sink_input and make use of it on sink ↵ | Lennart Poettering | 2009-04-08 | 4 | -46/+82 |
| | | | | flat volume change | ||||
* | after propagating a sink volume change to the sink inputs recalculate their ↵ | Lennart Poettering | 2009-04-07 | 2 | -25/+55 |
| | | | | soft volumes | ||||
* | we need to make our multiplications with linear values | Lennart Poettering | 2009-04-07 | 1 | -10/+10 |
| | |||||
* | reduce number of conversions to/from linear volumes | Lennart Poettering | 2009-04-07 | 1 | -2/+13 |
| | |||||
* | If the sink volume is lowered to 0 and then increased again, make sure all ↵ | Lennart Poettering | 2009-04-07 | 1 | -2/+6 |
| | | | | stream volumes follow instead of staying at 0 | ||||
* | add suspend_within_thread() callbacks to pa_sink_input/pa_source_output | Lennart Poettering | 2009-04-07 | 6 | -3/+44 |
| | |||||
* | enable debugging output based on if DEBUG_DATA macro is set | Lennart Poettering | 2009-04-07 | 1 | -6/+18 |
| | |||||
* | Make sure we don't get stuck when prebuf is too high | Lennart Poettering | 2009-04-06 | 2 | -32/+29 |
| | | | | | | | | If prebuf is greater than tlength minus minreq we might end up waiting for the buffer to fill up further however without ever asking for more data from the client since less minreq bytes might be missing. This fixes bug #440 | ||||
* | properly handle interpolation when queried x is left of last data position | Lennart Poettering | 2009-04-06 | 1 | -1/+17 |
| | |||||
* | be a bit more verbose about the busses we are connected to | Lennart Poettering | 2009-04-06 | 1 | -0/+7 |
| | |||||
* | make sure we keep a reference of the bus connection during the whole runtime ↵ | Lennart Poettering | 2009-04-06 | 1 | -2/+3 |
| | | | | if we manage to acquire the bus name | ||||
* | Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio | Lennart Poettering | 2009-04-05 | 4 | -5/+5 |
|\ | |||||
| * | increase log buffer further | Lennart Poettering | 2009-04-04 | 1 | -1/+1 |
| | | |||||
| * | various spelling fixes | Maarten Bosmans | 2009-04-04 | 3 | -4/+4 |
| | | |||||
* | | Fix a couple of races in native protocol | Lennart Poettering | 2009-04-05 | 1 | -42/+97 |
| | | | | | | | | | | | | | | | | | | Also make sure we account for recording memblock that are currently 'on the fly' between the main and the IO thread. Also makes a couple of timing calls that were done in different calls in a single inter-thread call. That way there is a better guarantee that they match up. | ||||
* | | introduce pa_{sink|source}_get_latency_within_thread() | Lennart Poettering | 2009-04-05 | 4 | -0/+55 |
| | | |||||
* | | Modify smoothing code to make cubic interpolation optional and allow 'quick ↵ | Lennart Poettering | 2009-04-05 | 2 | -9/+46 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixups' on resuming The primary reason for this change is to allow time graphs that do not go through the origin and hence smoothing starting from the origin is not desired. This change will allow passing time data into the smoother while paused and then abruptly use that data without smoothing using the 'quick fixup' flag when resuming. Primary use case is allowing recording time graphs where the data recorded originates from a time before the stream was created. The resulting graft will be shifted and should not be smoothened to go through the origin. | ||||
* | | properly account for seeks in the requested_bytes counter | Lennart Poettering | 2009-04-01 | 5 | -25/+30 |
|/ | |||||
* | use machine id instead of hostname to identify local connections | Lennart Poettering | 2009-04-01 | 2 | -13/+19 |
| | |||||
* | pass destination source/sink when moving streams so that we can access them | Lennart Poettering | 2009-04-01 | 5 | -20/+24 |
| | |||||
* | don't access i->sink if it is not set | Lennart Poettering | 2009-04-01 | 2 | -6/+10 |
| | |||||
* | be a bit more verbose about max_request changes | Lennart Poettering | 2009-03-31 | 1 | -5/+14 |
| | |||||
* | Log underruns | Lennart Poettering | 2009-03-31 | 1 | -1/+1 |
| | |||||
* | update command name table | Lennart Poettering | 2009-03-31 | 1 | -1/+14 |
| | |||||
* | revive solaris module | Finn Thain | 2009-03-31 | 1 | -10/+24 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Wed, 4 Mar 2009, Lennart Poettering wrote: [snip] > > This patch disables link map/library versioning unless ld is GNU ld. > > Another approach for solaris would be to use that linker's -M option, > > but I couldn't make that work (due to undefined mainloop, browse and > > simple symbols when linking pacat. I can post the errors if anyone is > > intested.) > > The linking in PA is a bit weird since we have a cyclic dependency > between libpulse and libpulsecommon which however is not explicit. Could that affect the pacat link somehow? What are the implications for client apps that link with the non-versioned libraries I've been building on solaris? [snip] > > struct userdata { > > pa_core *core; > > @@ -87,15 +92,24 @@ struct userdata { > > > > pa_memchunk memchunk; > > > > - unsigned int page_size; > > - > > uint32_t frame_size; > > - uint32_t buffer_size; > > - unsigned int written_bytes, read_bytes; > > + int32_t buffer_size; > > + volatile uint64_t written_bytes, read_bytes; > > + pa_mutex *written_bytes_lock; > > Hmm, we generally try do do things without locking in PA. This smells as > if it was solvable using atomic ints as well. > > Actually, looking at this again I get the impression these mutex are > completely unnecessary here. All functions that lock these mutexes are > called from the IO thread so no locking should be nessary. > > Please don't use volatile here. I am pretty sure it is a misuse. Also > see http://kernel.org/doc/Documentation/volatile-considered-harmful.txt > which applies here too I think. OK, I've removed the locks. For some reason I thought that the get_latency function was called from two different threads. > > +static void sink_set_volume(pa_sink *s) { > > + struct userdata *u; > > + audio_info_t info; > > + > > + pa_assert_se(u = s->userdata); > > + > > + if (u->fd >= 0) { > > + AUDIO_INITINFO(&info); > > + > > + info.play.gain = pa_cvolume_avg(&s->virtual_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM; > > + assert(info.play.gain <= AUDIO_MAX_GAIN); > > I'd prefer if you'd use pa_cvolume_max here instead of pa_cvolume_avg() > because this makes the volume independant of the balance. > > > - info.play.error = 0; > > + info.play.gain = pa_cvolume_avg(&s->virtual_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM; > > + assert(info.play.gain <= AUDIO_MAX_GAIN); > > Same here. (i.e. for the source) Done and done. > > + if (u->sink->thread_info.rewind_requested) > > + pa_sink_process_rewind(u->sink, 0); > > This is correct. > > > > > err = ioctl(u->fd, AUDIO_GETINFO, &info); > > pa_assert(err >= 0); > > Hmm, if at all this should be pa_assert_se(), not pa_assert() (so that > it is not defined away by -DNDEBUG). However I'd prefer if the error > would be could correctly. (I see that this code is not yours, but > still...) Done. > > + case EINTR: > > + break; > > I think you should simply try again in this case... Done. > > + case EAGAIN: > > + u->buffer_size = u->buffer_size * 18 / 25; > > + u->buffer_size -= u->buffer_size % u->frame_size; > > + u->buffer_size = PA_MAX(u->buffer_size, (int32_t)MIN_BUFFER_SIZE); > > + pa_sink_set_max_request(u->sink, u->buffer_size); > > + pa_log("EAGAIN. Buffer size is now %u bytes (%llu buffered)", u->buffer_size, buffered_bytes); > > + break; > > Hmm, care to explain this? EAGAIN happens when the user requests a buffer size that is too large for the STREAMS layer to accept. We end up looping with EAGAIN every time we try to write out the rest of the buffer, which burns enough CPU time to trip the CPU limit. So, I reduce the buffer size with each EAGAIN. This gets us reasonably close to the largest usable buffer size. (Perhaps there's a better way to determine what that limit is, but I don't know how.) > > + > > + pa_rtpoll_set_timer_absolute(u->rtpoll, xtime0 + pa_bytes_to_usec(buffered_bytes / 2, &u->sink->sample_spec)); > > + } else { > > + pa_rtpoll_set_timer_disabled(u->rtpoll); > > } > > Hmm, you schedule audio via timers? Is that a good idea? Perhaps not. I won't know until I test on more hardware. But, given that we have rt priority and high resolution timers on solaris, I think it is OK in theory... The reason I used a timer was to minimise CPU usage and avoid the CPU limit. Recall that getting woken up by poll is not an option for playback unfortunately. We can arrange for a signal when the FD becomes writable, but that throws out the whole buffer size concept, which acts to reduce latency. > That really only makes sense if you have to deal with large buffers and > support rewinding. I've implemented rewind support, but I'm still not sure that I have understood the concept; I take it that we "rewind" (from the point-of-view of the renderer, not the sink) so that some rendered but as yet unplayed portion of the memblock/buffers can then be rendered again? > Please keep in mind that the system clock and the sound card clock > deviate. If you use the system timers to do PCM scheduling ou might need > a pa_smoother object that is able to estimate the deviation for you. Actually, in an earlier version I did use a smoother (after reading about that in the wiki). But because of the non-monotonic sample counter (bug?) I decided that it probably wasn't worth the added complexity so I removed it. I'll put the smoother back if I can figure out the problem with the sample counter. > > > + u->frame_size = pa_frame_size(&ss); > > > > - if ((fd = open(p = pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), mode | O_NONBLOCK)) < 0) > > + u->buffer_size = 16384; > > It would appear more appropriate to me if the buffer size is adjusted by > the sample spec used. Done. > One last thing: it would probably be a good idea to allocate a pa_card > object and attach the sink and the source to it. It is possible to open /dev/audio twice by loading the solaris module twice -- once for the sink (passing record=0) and once for source (passing playback=0), thus giving seperate threads/LWPs for source and sink. It might be misleading to allocate two cards in that situation? > Right now pa_cards are mostly useful for switching profiles but even if > you do not allow switching profiles on-the-fly it is of some value to > find out via the cards object which source belongs to which sink. > > Otherwise I am happy! > > Thanks for your patch! I'd be thankful if you could fix the issues > pointed out and prepare another patch on top of current git! No problem. Patch follows. It also includes a portability fix for pa_realpath and a fix for a bug in the pa_signal_new() error path that causes signal data be freed if you attempt to register the same signal twice. > I hope I answered all your questions, Your answers were very helpful, thanks. Finn > > Lennart > > | ||||
* | handle failure to parse proplist in cli-command gracefully | Maarten Bosmans | 2009-03-31 | 1 | -4/+16 |
| | |||||
* | Merge commit 'elmarco/dbus' | Lennart Poettering | 2009-03-30 | 4 | -0/+613 |
|\ | |||||
| * | dbus: split dbus-util into dbus-shared | Marc-André Lureau | 2009-03-30 | 4 | -0/+613 |
| | | | | | | | | | | modules: fix dbus-util include pulse: get dbus at context connection | ||||
* | | Use pa_source_set_max_rewind_within_thread() for updating the monitor ↵ | Lennart Poettering | 2009-03-30 | 1 | -1/+1 |
| | | | | | | | | source's max_rewind | ||||
* | | Merge commit 'origin/master' | Lennart Poettering | 2009-03-30 | 2 | -2/+2 |
|\ \ |