From patchwork Tue Aug 18 19:24:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?T2xkw4XihKJpY2ggSmVkbGnDhMKNa2E=?= X-Patchwork-Id: 42407 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7IJPNqZ013970 for ; Tue, 18 Aug 2009 19:25:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751325AbZHRTY6 (ORCPT ); Tue, 18 Aug 2009 15:24:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751336AbZHRTY6 (ORCPT ); Tue, 18 Aug 2009 15:24:58 -0400 Received: from smtp.seznam.cz ([77.75.72.43]:35683 "EHLO smtp.seznam.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751325AbZHRTY5 convert rfc822-to-8bit (ORCPT ); Tue, 18 Aug 2009 15:24:57 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=seznam.cz; h=Received:From:To:Subject:Date:User-Agent:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-Disposition:Message-Id:X-Smtpd:X-Seznam-User:X-QM-Mark; b=ar3xy2TVymPYB+iaC5K9PQENsT9xE4sPpZAhCvIcx1nDiAcq+u1P3b9ULU3hA1Tk7 j9BDqB1czj3767h1FUO2NcziJRS3eyxK3+JLSemTMypj0npiwXfDERgJYttZ650o+Kf 2+3+7uYfv2FNbZmdklZdh8xGrEJiIYb5x6nn0nI= Received: from oldium (ip-89-103-84-89.karneval.cz [89.103.84.89]) by email-relay2.go.seznam.cz (Seznam SMTPD 1.1.7@13984) with ESMTP; Tue, 18 Aug 2009 21:24:57 +0200 (CEST) From: =?utf-8?q?Old=C5=99ich_Jedli=C4=8Dka?= To: LMML Subject: [PATCH] Report only 32kHz for ALSA Date: Tue, 18 Aug 2009 21:24:54 +0200 User-Agent: KMail/1.9.10 Cc: Mauro Carvalho Chehab , hermann pitton MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200908182124.54739.oldium.pro@seznam.cz> X-Smtpd: 1.1.7@13984 X-Seznam-User: oldium.pro@seznam.cz X-QM-Mark: email-qm2<450451876> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org There are several reasons: - SAA7133/35 uses DDEP (DemDec Easy Programming mode), which works in 32kHz only - SAA7134 for TV mode uses DemDec mode (32kHz) - Radio works in 32kHz only - When recording 48kHz from Line1/Line2, switching of capture source to TV means switching to 32kHz without any frequency translation Signed-off-by: Oldřich Jedlička Acked-by: hermann pitton --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index c09ec3e..504186a 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -440,6 +440,16 @@ snd_card_saa7134_capture_pointer(struct snd_pcm_substream * substream) /* * ALSA hardware capabilities definition + * + * Report only 32kHz for ALSA: + * + * - SAA7133/35 uses DDEP (DemDec Easy Programming mode), which works in 32kHz + * only + * - SAA7134 for TV mode uses DemDec mode (32kHz) + * - Radio works in 32kHz only + * - When recording 48kHz from Line1/Line2, switching of capture source to TV + * means + * switching to 32kHz without any frequency translation */ static struct snd_pcm_hardware snd_card_saa7134_capture = @@ -453,9 +463,9 @@ static struct snd_pcm_hardware snd_card_saa7134_capture = SNDRV_PCM_FMTBIT_U8 | \ SNDRV_PCM_FMTBIT_U16_LE | \ SNDRV_PCM_FMTBIT_U16_BE, - .rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000, + .rates = SNDRV_PCM_RATE_32000, .rate_min = 32000, - .rate_max = 48000, + .rate_max = 32000, .channels_min = 1, .channels_max = 2, .buffer_bytes_max = (256*1024),