From: Takashi Iwai <tiwai@suse.de>
To: Juan Carlos Castro y Castro <jcastro@instant.com.br>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Another asinine question
Date: Wed, 17 May 2006 15:26:20 +0200 [thread overview]
Message-ID: <s5h3bf84war.wl%tiwai@suse.de> (raw)
In-Reply-To: <4469FDA7.2090105@instant.com.br>
At Tue, 16 May 2006 13:28:23 -0300,
Juan Carlos Castro y Castro wrote:
>
> Takashi Iwai wrote:
>
> >Juan Carlos Castro y Castro wrote:
> >
> >
> >>By the way, my pcm_file extensions DO work! It's the "plug" plugin
> >>that's not passing the reads! Stay tuned...
> >>
> >>
> >Great, feel free to submit the patches to alsa-devel ML (Cc to me).
> >
> Your wish is my command, Takashi-san. ;)
>
> Note the interleaved read has not yet been implemented. Also, I'm not
> yet dealing with blocking versus non-blocking at the moment. When
> reading from a file, read()'s just keep getting zero bytes and arecord
> doesn't mind. Some deal of sophistication will have to be added.
That's OK. We can extend the feature later.
> Another thing: you'll see I just "hung" another snd_pcm_file_t structure
> at the bottom of the original one. I'll understand if that offends
> people's coding sensibilities -- it offended mine. :-/
Does't only one file descriptor instead of the whole snd_pcm_file
struct suffice? Actually, it's used only in readi().
> @@ -377,11 +403,11 @@ static snd_pcm_fast_ops_t snd_pcm_file_f
> * changed in future.
> */
> int snd_pcm_file_open(snd_pcm_t **pcmp, const char *name,
> - const char *fname, int fd, const char *fmt, int perm,
> - snd_pcm_t *slave, int close_slave)
> + const char *fname, int fd, const char *ifname, int ifd,
> + const char *fmt, int perm, snd_pcm_t *slave, int close_slave)
Don't forget to change the doxygen comment for this function.
> @@ -405,7 +431,34 @@ int snd_pcm_file_open(snd_pcm_t **pcmp,
> close(fd);
> return -ENOMEM;
> }
> -
> +
> + if (ifname) {
> + ifd = open(ifname, O_RDONLY);
> + if (ifd < 0) {
> + SYSERR("open %s for reading failed", ifname);
> + if (fname)
> + close(fd);
> + return -errno;
> + }
> + }
> + if (ifd) {
Should be "if (ifd >= 0)".
Also, please make a patch against the latest HG repository.
The typo in readn() was already fixed, so your last patch conflicts
with the latest tree.
Thanks,
Takashi
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
next prev parent reply other threads:[~2006-05-17 13:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-12 15:06 Another asinine question Juan Carlos Castro y Castro
2006-05-16 13:38 ` Takashi Iwai
2006-05-16 14:33 ` Juan Carlos Castro y Castro
2006-05-16 14:38 ` Takashi Iwai
2006-05-16 16:28 ` Juan Carlos Castro y Castro
2006-05-17 13:26 ` Takashi Iwai [this message]
2006-05-16 18:44 ` Juan Carlos Castro y Castro
2006-05-16 15:52 ` Error compiling alsa-driver from sources Juan Carlos Castro y Castro
2006-05-16 15:56 ` Takashi Iwai
2006-05-16 18:33 ` Juan Carlos Castro y Castro
-- strict thread matches above, loose matches on Subject: below --
2006-05-17 14:48 Another asinine question Juan Carlos Castro y Castro
2006-05-17 15:24 ` Takashi Iwai
2006-05-17 16:22 ` Juan Carlos Castro y Castro
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=s5h3bf84war.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=jcastro@instant.com.br \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox