All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Hofman <pavel.hofman@ivitera.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH - ice1724 1/4] ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations
Date: Mon, 09 Jan 2012 08:36:54 +0100	[thread overview]
Message-ID: <4F0A9916.9050606@ivitera.com> (raw)
In-Reply-To: <s5hboqemubc.wl%tiwai@suse.de>



Dne 8.1.2012 10:12, Takashi Iwai napsal(a):
> At Thu,  5 Jan 2012 22:01:55 +0100,
> pavel.hofman@ivitera.com wrote:
>>
>> From: Pavel Hofman <pavel.hofman@ivitera.com>
>>
>> Add the capture pcm only if there is at least one ADC configured in
>> the SYSCONF register.
>>
>> Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
>>
>> diff --git a/pci/ice1712/ice1724.c b/pci/ice1712/ice1724.c
>> index 4353e76..2a0be2c 100644
>> --- a/pci/ice1712/ice1724.c
>> +++ b/pci/ice1712/ice1724.c
>> @@ -1117,14 +1117,18 @@ static struct snd_pcm_ops snd_vt1724_capture_pro_ops = {
>>  static int __devinit snd_vt1724_pcm_profi(struct snd_ice1712 *ice, int device)
>>  {
>>  	struct snd_pcm *pcm;
>> -	int err;
>> +	int capt, err;
>>  
>> -	err = snd_pcm_new(ice->card, "ICE1724", device, 1, 1, &pcm);
>> +	capt = (~ice->eeprom.data[ICE_EEP2_SYSCONF] & VT1724_CFG_ADC_MASK) ?
>> +		1 : 0;
> 
> Are you sure that this is correct?  I thought the value 0 means 1 ADC,
> 1 is two ADCS, etc.
> 

I think it is correct. This is what the datasheet says:

CCS04: System Configuration Register

bits 3:2

00: one stereo ADC connected
01: two stereo ADCs connected
10: one stereo ADC and a S/PDIF receiver connected
11: No physical inputs


I have two soundcards, one with 10 (ADC + SPDIF in), another with 11 (no
ADC), the code seems to work fine.

Thanks,

Pavel.

  reply	other threads:[~2012-01-09  7:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-05 21:01 [PATCH - ice1724 1/4] ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations pavel.hofman
2012-01-05 21:01 ` [PATCH - ice1724 2/4] ALSA: ice1724 - External clock item only for cards with SPDIF_IN pavel.hofman
2012-01-08 13:33   ` Takashi Iwai
2012-01-05 21:01 ` [PATCH - ice1724 3/4] ALSA: ice1724 - Allow card info based on model only pavel.hofman
2012-01-08 13:33   ` Takashi Iwai
2012-01-05 21:01 ` [PATCH - ice1724 4/4] ALSA: ice1724 - Support for ooAoo SQ210a pavel.hofman
2012-01-08  9:13   ` Takashi Iwai
2012-01-09  8:32     ` Pavel Hofman
2012-01-09  9:24       ` Clemens Ladisch
2012-01-09  9:59         ` Pavel Hofman
2012-01-08  9:12 ` [PATCH - ice1724 1/4] ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations Takashi Iwai
2012-01-09  7:36   ` Pavel Hofman [this message]
2012-01-09  9:27     ` Takashi Iwai
2012-01-09  9:48       ` Pavel Hofman
2012-01-09  9:51         ` Takashi Iwai
2012-01-09  9:53           ` Pavel Hofman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F0A9916.9050606@ivitera.com \
    --to=pavel.hofman@ivitera.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.