There is only one LRCLK signal, so any more than two channels will need some external multiplexing logic.
subtype Channel_Count is Positive range 1 .. 2;
type I2S_Device
(Data : not null access RP.GPIO.GPIO_Point;
BCLK : not null access RP.GPIO.GPIO_Point;
LRCLK : not null access RP.GPIO.GPIO_Point;
PIO : not null access RP.PIO.PIO_Device'Class;
SM : RP.PIO.PIO_SM;
Channels : Channel_Count;
DMA_Channel : RP.DMA.DMA_Channel_Id;
Buffer_Size : Positive)
is limited new HAL.Audio.Audio_Stream with private;
procedure Initialize
(This : in out I2S_Device;
Frequency : HAL.Audio.Audio_Frequency;
Channels : Channel_Count := 1)
procedure Receive
(This : in out I2S_Device;
Data : out HAL.Audio.Audio_Buffer)
procedure Set_Frequency
(This : in out I2S_Device;
Frequency : HAL.Audio.Audio_Frequency)
procedure Transmit
(This : in out I2S_Device;
Data : HAL.Audio.Audio_Buffer)