diff options
author | Toomas Soome <tsoome@me.com> | 2019-12-31 10:19:29 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2020-04-01 18:43:37 +0300 |
commit | 86e38daa32bf0ca85f79384da2d3e43bf87f328b (patch) | |
tree | 5279c505db890f1823c00fccc57a2942edc736b6 | |
parent | e121b61f5e8ffbeb2f6b373c967c80351333ee21 (diff) | |
download | illumos-joyent-86e38daa32bf0ca85f79384da2d3e43bf87f328b.tar.gz |
12402 audiocmihd: variable may be used uninitialized
Reviewed by: Yuri Pankov <ypankov@fastmail.com>
Reviewed by: C Fraire <cfraire@me.com>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/uts/common/io/audio/drv/audiocmihd/audiocmihd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/src/uts/common/io/audio/drv/audiocmihd/audiocmihd.c b/usr/src/uts/common/io/audio/drv/audiocmihd/audiocmihd.c index 89117995e2..d6c754c1ee 100644 --- a/usr/src/uts/common/io/audio/drv/audiocmihd/audiocmihd.c +++ b/usr/src/uts/common/io/audio/drv/audiocmihd/audiocmihd.c @@ -118,7 +118,7 @@ static audio_engine_ops_t cmediahd_engine_ops = { cmediahd_channels, cmediahd_rate, cmediahd_sync, - NULL, /* qlen */ + NULL, /* qlen */ cmediahd_chinfo, NULL /* playahead */ }; @@ -322,7 +322,7 @@ cs4398_init(void *arg, int codec) i2c_write(devc, codec, CS4398_MODE_CTRL, 0x00); i2c_write(devc, codec, 3, 0x09); i2c_write(devc, codec, 4, 0x82); /* PCM Automute */ - i2c_write(devc, codec, 5, 0x80); /* Vol A+B to -64dB */ + i2c_write(devc, codec, 5, 0x80); /* Vol A+B to -64dB */ i2c_write(devc, codec, 6, 0x80); i2c_write(devc, codec, 7, 0xf0); /* soft ramping on */ @@ -369,7 +369,6 @@ cs4362a_init(void *arg, int codec) static void cmediahd_generic_set_play_volume(cmediahd_devc_t *devc, int codec_id, int left, int right) - { spi_write(devc, codec_id, AK4396_LchATTCtl | 0x20, mix_scale(left, 8)); spi_write(devc, codec_id, AK4396_RchATTCtl | 0x20, mix_scale(right, 8)); @@ -707,6 +706,9 @@ cmediahd_reset_port(cmediahd_portc_t *portc) case 8: channels = 3; break; + default: + channels = 0x0; + break; } OUTB(devc, (INB(devc, MULTICH_MODE) & ~0x3) | channels, MULTICH_MODE); |