From mboxrd@z Thu Jan 1 00:00:00 1970 From: Knut Petersen Subject: Re: [PATCH] Add PM support to the rme96 driver Date: Tue, 13 Aug 2013 11:02:53 +0200 Message-ID: <5209F63D.5020903@t-online.de> References: <52090D78.70601@t-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mailout07.t-online.de (mailout07.t-online.de [194.25.134.83]) by alsa0.perex.cz (Postfix) with ESMTP id 130BE26517A for ; Tue, 13 Aug 2013 11:03:07 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Takashi Iwai Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On 13.08.2013 09:24, Takashi Iwai wrote: > At Mon, 12 Aug 2013 18:29:44 +0200, > Knut Petersen wrote: >> >From 7305b056cbb4de562018483b91cf90c677df317f Mon Sep 17 00:00:00 2001 >> From: Knut Petersen >> Date: Mon, 12 Aug 2013 18:00:30 +0200 >> Subject: [PATCH] alsa/rme96: Add PM support to the rme96 driver > Isn't there any other information you'd like to add? > Put it here. Ok, I`ll try to be a bit more verbose. Without the hardware reinitialization added, the first use of this card anytime after a suspend / resume cycle will start with distortions. > SNDRV_PCM_INFO_SYNC_START | > +#ifdef CONFIG_PM > + SNDRV_PCM_INFO_RESUME | > +#endif > No need for ifdef. ACK. > +static int > +snd_rme96_suspend(struct pci_dev *pci, > + pm_message_t state) > +{ > + struct snd_card *card = pci_get_drvdata(pci); > + struct rme96 *rme96 = card->private_data; > + > + snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); [...] > + > + pci_disable_device(pci); > + pci_save_state(pci); > Doesn't it go to PCI D3 state? lspci -vv 05:04.0 Multimedia audio controller: Xilinx Corporation RME Digi96/8 Pad (rev 04) Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- SERR- > +#ifdef CONFIG_PM >> + rme96->playback_suspend_buffer = kmalloc(RME96_BUFFER_SIZE, GFP_KERNEL); >> + if (!rme96->playback_suspend_buffer) { >> + snd_printk(KERN_ERR "Failed to allocate playback suspend buffer!\n"); >> + return -ENOMEM; >> + } >> + rme96->capture_suspend_buffer = kmalloc(RME96_BUFFER_SIZE, GFP_KERNEL); >> + if (!rme96->capture_suspend_buffer) { >> + snd_printk(KERN_ERR "Failed to allocate capture suspend buffer!\n"); >> + return -ENOMEM; > Better to use vmalloc() for 64k buffer. ACK > Other than the above, please fix the coding-style issues. ok, cu, knut