Issues with caps negotiation delayed-linking `deinterleave.src_0` to `queue.sink`

I am trying to make a pipeline that does the following:

  1. Read from a microphone with alsasrc
  2. Use only the first channel with deinterleave
  3. Convert the audio to audio/x-raw,format=S16LE,rate=16000,channels=1
  4. Use the result with appsink

An example launch command is as follows:

gst-launch-1.0 alsasrc ! deinterleave name=d d.src_0 ! queue ! audioconvert ! appsink caps=audio/x-raw,format=S16LE,rate=16000,channels=1

(alsasrc can be replaced with audiotestsrc + a caps filter representing the microphone capabilities for testing.)

When the microphone natively supports a 16kHz sample rate, this pipeline works without any issues. When the microphone does not support 16kHz, however (many only support 44.1kHz), the pad linking between deinterleave and queue fails.

It seems that the audioconvert is not helping. How can I solve this issue? A pipeline graph taken after pad linking fails is included below.

Turns out I need audioresample:

gst-launch-1.0 alsasrc ! deinterleave name=d d.src_0 ! queue ! audioconvert ! audioresample ! appsink caps=audio/x-raw,format=S16LE,rate=16000,channels=1