From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-eopbgr690135.outbound.protection.outlook.com ([40.107.69.135]:4506 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728091AbeIGFOQ (ORCPT ); Fri, 7 Sep 2018 01:14:16 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Takashi Iwai , Sasha Levin Subject: [PATCH AUTOSEL 4.18 08/88] ALSA: msnd: Fix the default sample sizes Date: Fri, 7 Sep 2018 00:35:58 +0000 Message-ID: <20180907003547.57567-8-alexander.levin@microsoft.com> References: <20180907003547.57567-1-alexander.levin@microsoft.com> In-Reply-To: <20180907003547.57567-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Takashi Iwai [ Upstream commit 7c500f9ea139d0c9b80fdea5a9c911db3166ea54 ] The default sample sizes set by msnd driver are bogus; it sets ALSA PCM format, not the actual bit width. Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/isa/msnd/msnd_pinnacle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/isa/msnd/msnd_pinnacle.c b/sound/isa/msnd/msnd_pinnacle.= c index 6c584d9b6c42..a19f802b2071 100644 --- a/sound/isa/msnd/msnd_pinnacle.c +++ b/sound/isa/msnd/msnd_pinnacle.c @@ -82,10 +82,10 @@ =20 static void set_default_audio_parameters(struct snd_msnd *chip) { - chip->play_sample_size =3D DEFSAMPLESIZE; + chip->play_sample_size =3D snd_pcm_format_width(DEFSAMPLESIZE); chip->play_sample_rate =3D DEFSAMPLERATE; chip->play_channels =3D DEFCHANNELS; - chip->capture_sample_size =3D DEFSAMPLESIZE; + chip->capture_sample_size =3D snd_pcm_format_width(DEFSAMPLESIZE); chip->capture_sample_rate =3D DEFSAMPLERATE; chip->capture_channels =3D DEFCHANNELS; } --=20 2.17.1