All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Jiang <scott.jiang.linux@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Subject: Re: Have multiple opens removed on one device?
Date: Thu, 1 Sep 2011 11:43:09 +0800	[thread overview]
Message-ID: <CAHG8p1BupAyLzNe4jB2W0DKBq1z3njgU4d+KPWma4AbqCyuQOw@mail.gmail.com> (raw)
In-Reply-To: <CAHG8p1B4b+F_Uoo8+QTn_g3XDF6AcW-WdfsyovsEupJLUZQxVw@mail.gmail.com>

2011/8/29 Scott Jiang <scott.jiang.linux@gmail.com>:
>
> Indeed we use dmix. But now we can't open the same device twice.
> Our alsa lib and utils version is 1.0.18.
> The test command: aplay 1.wav &; aplay 1.wav
> In 2.6.34, strace
> open("/dev/snd/pcmC0D0p", O_RDWR|O_NONBLOCK) = 4
> open("/dev/snd/pcmC0D0p", O_RDWR|O_APPEND|O_NONBLOCK) = 4
>
> In 3.0, strace
> open("/dev/snd/pcmC0D0p", O_RDWR|O_NONBLOCK) = 4
> open("/dev/snd/pcmC0D0p", O_RDWR|O_NONBLOCK) = -1 EBUSY (Device or
> resource busy)
>
> The O_APPEND flag missed in new kernel. But we use the same lib and
> utils. It's strange.
> And I found the prefer subdevice changes from 0 to -1. These two
> changes cause kernel return device busy.
>
> Mark, can you do this simple test on your board? I appreciate your
> help. Thank you very much.
>

I know the reason. The card config file didn't read properly.
Asoc doesn't copy codec name to card->driver now. I guess it is
because multiple codecs are supported.
I add driver_name in my snd_soc_card to solve this bug. But I scan
other drivers in asoc, nobody did this.
Maybe nobody are aware of this. Are there any better way to solve this bug?

Regards,
Scott

      reply	other threads:[~2011-09-01  3:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-22 10:13 Have multiple opens removed on one device? Scott Jiang
2011-08-22 10:15 ` Takashi Iwai
2011-08-22 11:21   ` Mark Brown
2011-08-29 10:11     ` Scott Jiang
2011-09-01  3:43       ` Scott Jiang [this message]

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=CAHG8p1BupAyLzNe4jB2W0DKBq1z3njgU4d+KPWma4AbqCyuQOw@mail.gmail.com \
    --to=scott.jiang.linux@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --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.