Re: [PATCH v8 6/6] coreaudio: Initialize the buffer for device change
On 2026/03/04 20:39, Christian Schoenebeck wrote: On Wednesday, 4 March 2026 07:16:59 CET Akihiko Odaki wrote: Reallocate buffers when the active device change as the required buffer size may differ. Signed-off-by: Akihiko Odaki Reviewed-by: Phil Dennis-Jordan Acked-by: Christian Schoenebeck --- audio/coreaudio.m | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/coreaudio.m b/audio/coreaudio.m index 23c3d1f80ac5..e4ec1df971c8 100644 --- a/audio/coreaudio.m +++ b/audio/coreaudio.m @@ -471,6 +471,7 @@ static OSStatus init_out_device(CoreaudioVoiceOut *core) core->device_id = device_id; core->device_frame_size = device_frame_size; core->hw.samples = core->buffer_count * core->device_frame_size; +audio_generic_initialize_buffer_out(&core->hw); core->ioprocid = ioprocid; return 0; There is no specific reason to insert that call between the struct initializers here, or is there? I mean the device is suspended at this point, so it should not matter. Just looks a bit weird. I will move it after core->ioprocid = ioprocid. Regards, Akihiko Odaki But in general, LGTM: Reviewed-by: Christian Schoenebeck
Re: [PATCH v8 6/6] coreaudio: Initialize the buffer for device change
On Wednesday, 4 March 2026 07:16:59 CET Akihiko Odaki wrote: > Reallocate buffers when the active device change as the required buffer > size may differ. > > Signed-off-by: Akihiko Odaki > Reviewed-by: Phil Dennis-Jordan > Acked-by: Christian Schoenebeck > --- > audio/coreaudio.m | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/audio/coreaudio.m b/audio/coreaudio.m > index 23c3d1f80ac5..e4ec1df971c8 100644 > --- a/audio/coreaudio.m > +++ b/audio/coreaudio.m > @@ -471,6 +471,7 @@ static OSStatus init_out_device(CoreaudioVoiceOut *core) > core->device_id = device_id; > core->device_frame_size = device_frame_size; > core->hw.samples = core->buffer_count * core->device_frame_size; > +audio_generic_initialize_buffer_out(&core->hw); > core->ioprocid = ioprocid; > > return 0; There is no specific reason to insert that call between the struct initializers here, or is there? I mean the device is suspended at this point, so it should not matter. Just looks a bit weird. But in general, LGTM: Reviewed-by: Christian Schoenebeck
Re: [PATCH v8 6/6] coreaudio: Initialize the buffer for device change
On Wed, Mar 4, 2026 at 7:17 AM Akihiko Odaki wrote: > > Reallocate buffers when the active device change as the required buffer > size may differ. > > Signed-off-by: Akihiko Odaki > Reviewed-by: Phil Dennis-Jordan > Acked-by: Christian Schoenebeck > --- > audio/coreaudio.m | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/audio/coreaudio.m b/audio/coreaudio.m > index 23c3d1f80ac5..e4ec1df971c8 100644 > --- a/audio/coreaudio.m > +++ b/audio/coreaudio.m > @@ -471,6 +471,7 @@ static OSStatus init_out_device(CoreaudioVoiceOut *core) > core->device_id = device_id; > core->device_frame_size = device_frame_size; > core->hw.samples = core->buffer_count * core->device_frame_size; > +audio_generic_initialize_buffer_out(&core->hw); Reviewed-by: Marc-André Lureau > core->ioprocid = ioprocid; > > return 0; > > -- > 2.53.0 >
[PATCH v8 6/6] coreaudio: Initialize the buffer for device change
Reallocate buffers when the active device change as the required buffer size may differ. Signed-off-by: Akihiko Odaki Reviewed-by: Phil Dennis-Jordan Acked-by: Christian Schoenebeck --- audio/coreaudio.m | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/coreaudio.m b/audio/coreaudio.m index 23c3d1f80ac5..e4ec1df971c8 100644 --- a/audio/coreaudio.m +++ b/audio/coreaudio.m @@ -471,6 +471,7 @@ static OSStatus init_out_device(CoreaudioVoiceOut *core) core->device_id = device_id; core->device_frame_size = device_frame_size; core->hw.samples = core->buffer_count * core->device_frame_size; +audio_generic_initialize_buffer_out(&core->hw); core->ioprocid = ioprocid; return 0; -- 2.53.0
