File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
src/devices/src/virtio/snd Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ impl AudioBackend for PwBackend {
194
194
. write ( )
195
195
. unwrap ( )
196
196
. get_mut ( stream_id as usize )
197
- . ok_or_else ( || Error :: StreamWithIdNotFound ( stream_id) ) ?
197
+ . ok_or ( Error :: StreamWithIdNotFound ( stream_id) ) ?
198
198
. state
199
199
. prepare ( ) ;
200
200
if let Err ( err) = prepare_result {
@@ -501,7 +501,7 @@ impl AudioBackend for PwBackend {
501
501
. write ( )
502
502
. unwrap ( )
503
503
. get_mut ( stream_id as usize )
504
- . ok_or_else ( || Error :: StreamWithIdNotFound ( stream_id) ) ?
504
+ . ok_or ( Error :: StreamWithIdNotFound ( stream_id) ) ?
505
505
. state
506
506
. release ( ) ;
507
507
if let Err ( err) = release_result {
@@ -530,7 +530,7 @@ impl AudioBackend for PwBackend {
530
530
. write ( )
531
531
. unwrap ( )
532
532
. get_mut ( stream_id as usize )
533
- . ok_or_else ( || Error :: StreamWithIdNotFound ( stream_id) ) ?
533
+ . ok_or ( Error :: StreamWithIdNotFound ( stream_id) ) ?
534
534
. state
535
535
. start ( ) ;
536
536
if let Err ( err) = start_result {
@@ -555,7 +555,7 @@ impl AudioBackend for PwBackend {
555
555
. write ( )
556
556
. unwrap ( )
557
557
. get_mut ( stream_id as usize )
558
- . ok_or_else ( || Error :: StreamWithIdNotFound ( stream_id) ) ?
558
+ . ok_or ( Error :: StreamWithIdNotFound ( stream_id) ) ?
559
559
. state
560
560
. stop ( ) ;
561
561
if let Err ( err) = stop_result {
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ type Result<T> = std::result::Result<T, Error>;
38
38
/// - `SET PARAMETERS`
39
39
///
40
40
/// The driver negotiates the stream parameters (format, transport, etc) with
41
- /// the device.
41
+ /// the device.
42
42
///
43
43
/// Possible valid transitions: `SET PARAMETERS`, `PREPARE`.
44
44
///
@@ -47,7 +47,7 @@ type Result<T> = std::result::Result<T, Error>;
47
47
/// The device prepares the stream (allocates resources, etc).
48
48
///
49
49
/// Possible valid transitions: `SET PARAMETERS`, `PREPARE`, `START`,
50
- /// `RELEASE`. Output only: the driver transfers data for pre-buffing.
50
+ /// `RELEASE`. Output only: the driver transfers data for pre-buffing.
51
51
///
52
52
/// - `START`
53
53
///
Original file line number Diff line number Diff line change @@ -661,7 +661,7 @@ impl SndWorker {
661
661
}
662
662
663
663
if !stream_ids. is_empty ( ) {
664
- let b = self . audio_backend . write ( ) . unwrap ( ) ;
664
+ let b = self . audio_backend . read ( ) . unwrap ( ) ;
665
665
for id in stream_ids {
666
666
b. write ( id) . unwrap ( ) ;
667
667
}
You can’t perform that action at this time.
0 commit comments