alsa: Implement playback/capture rate control for USB gadgets

If we detect Playback/Capture Pitch 1000000, we can adjust those values
to update the feedback endpoint for the host. On the capture side, this
will instruct the host to adjust the rate at which data is being sent.
On the playback side, this will adjust the amount of data the USB gadget
driver sends out in each USB tick.
This commit is contained in:
Arun Raghavan 2023-06-08 17:37:04 -04:00 committed by Wim Taymans
parent 2919b55f7f
commit abb300750f
4 changed files with 105 additions and 2 deletions

View file

@ -709,6 +709,7 @@ impl_node_port_set_io(void *object,
break;
case SPA_IO_RateMatch:
this->rate_match = data;
spa_alsa_update_rate_match(this);
break;
default:
return -ENOENT;