<div dir="ltr">Thanks wasn't too difficult to track down after your info. The max request was not correct in my module.<div><br></div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On 21 March 2015 at 04:48, Tanu Kaskinen <span dir="ltr"><<a href="mailto:tanu.kaskinen@linux.intel.com" target="_blank">tanu.kaskinen@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 2015-03-20 at 08:04 +1100, Brendon Costa wrote:<br>
> Hi all,<br>
><br>
> I am developing a pulse audio sink module for a custom networked audio<br>
> device I have.<br>
><br>
> This device only supports a very specific format: 3 channel<br>
> PA_SAMPLE_S16NE @ 32000Hz and uses a custom TCP protocol.<br>
><br>
> I am using the esound-sink module as a basis to develop my one and<br>
> have setup my pa_sample_spec accordingly. The module starts up,<br>
> pushing silence through to the device fine.<br>
><br>
> However when I try and connect a music player source to it I get the<br>
> following assertion:<br>
><br>
> sink-input.c: Assertion 'pa_frame_aligned(nbytes,<br>
> &i->sink->sample_spec)' failed at pulsecore/sink-input.c:1168,<br>
> function pa_sink_input_update_max_request(). Aborting.<br>
><br>
> I couldn't make much sense of this assertion. Is someone able to help<br>
> me out with its meaning/cause?<br>
<br>
</span>The assertion means that the nbytes parameter of<br>
pa_sink_input_update_max_request() was not a multiple of the size of one<br>
frame. If the sink in question is the sink that you're developing, i.e.<br>
the audio format is 3 channels with 16-bit samples, the size of one<br>
frame is 6 bytes. Check who called the function and why it gave a number<br>
that is not a multiple of 6.<br>
<span class=""><br>
> My original guess is that it is related to this specific sample spec<br>
> not matching the music players source spec (though weird that such an<br>
> error would be an assertion so I am probably wrong).<br>
><br>
> Is pulse audio supposed to auto "match" sample specs between sinks and<br>
> sources?<br>
<br>
</span>You probably mean "sink inputs" instead of "sources". A music player<br>
application is represented by a "sink input". A "source" would be a<br>
capture device.<br>
<br>
But to answer your question: yes, when the audio format of a sink input<br>
doesn't match the format of the sink, the audio is automatically<br>
converted to the right format.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Tanu<br>
<br>
<br>
</font></span></blockquote></div><br></div></div></div>