From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sound4 - Camille Gonnet Subject: Creating a new hardware Date: Wed, 06 Dec 2006 13:00:59 +0100 Message-ID: <4576B0FB.6060402@sound4.biz> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0985296884==" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --===============0985296884== Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hello,

If this is not the right place to send these questions, please tell me where I should ask !

I'm creating a company in the sound processing domain. It is for a very specific domain : audio broadcasting (radio FM, AM, TV, internet radio, ...).
The hardware is ready, but I need to finish my programmable logic inside the board.
This card will be able to playback and capture, but this is not only a standard audio board, there is a huge DSP processing inside, and the card can work from connectors audio input/outputs without PCI access at all.

I made my own pci driver to access my DSP, and everything worked fine.
Now I am working on the ALSA driver, but I didn't understand everything, and it doesn't work.
I don't know which way I should take ! Like vx222 (interrupt manual copy) or like rme9652 (.copy operator) ?
As I need to fix my hardware, I would like to make it correct for ALSA.
Here is how it works for the moment, and how I would like to let it !

I have 2 buffers for playback and 2 for capture. They work in the same way.
The 4 are mapped on the same address range.
We can write only on an empty buffer for playback, and read from a ready buffer for capture.
Buffers are toggled automatically (double-buffering) :
    - one hidden sending audio playback , the other for filling thru PCI the playback buffer,
    - one hidden  receiving audio for capture, the other for reading thru PCI the capture buffer.
An interrupt is generated (and stays active) when there is at least one free buffer for playback.
An interrupt is generated (and stays active) when there is at least one ready buffer for capture.
I also have a sticky flag to know if playback has underrun or capture has overrun.
Buffers are very small (85 samples stereo 24 bits on three bytes), and a buffer is considered
    - not empty for playback (ie can be send) when last position is written
    - not ready for capture (ie can be recorded) when last position is read
Buffers are pci resource ioremapped.
I don't have pointer of current hardware position, but I could add one if necessary.

I didn't find informations or forums to help me and I don't know where to search. I am pretty new in Linux development.
Please help me to make my board efficient with ALSA.

Thanks a lot for your help,


Camille Gonnet
Hardware developper, DSP programmer & driver writer.
http://www.sound4.biz

--===============0985296884== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV --===============0985296884== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Alsa-devel mailing list Alsa-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-devel --===============0985296884==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: James C Georgas Subject: ac97 maintenance Date: Wed, 06 Dec 2006 14:08:50 -0500 Message-ID: <1165432130.23056.13.camel@Rainsong> References: <4576B0FB.6060402@sound4.biz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4576B0FB.6060402@sound4.biz> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org Who is maintaining the ac97 stuff these days? ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Courtier-Dutton Subject: Re: ac97 maintenance Date: Wed, 06 Dec 2006 19:18:48 +0000 Message-ID: <45771798.1090906@superbug.co.uk> References: <4576B0FB.6060402@sound4.biz> <1165432130.23056.13.camel@Rainsong> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1165432130.23056.13.camel@Rainsong> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: James C Georgas Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org James C Georgas wrote: > Who is maintaining the ac97 stuff these days? > What sort of question is that? If you have a problem, raise a bug report. There are quite a few developers that can fix bugs in that bit of code. James ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV From mboxrd@z Thu Jan 1 00:00:00 1970 From: James C Georgas Subject: Re: ac97 maintenance Date: Wed, 06 Dec 2006 14:24:03 -0500 Message-ID: <1165433043.23056.17.camel@Rainsong> References: <4576B0FB.6060402@sound4.biz> <1165432130.23056.13.camel@Rainsong> <45771798.1090906@superbug.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <45771798.1090906@superbug.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: James Courtier-Dutton Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org On Wed, 2006-06-12 at 19:18 +0000, James Courtier-Dutton wrote: > James C Georgas wrote: > > Who is maintaining the ac97 stuff these days? > > > > What sort of question is that? > If you have a problem, raise a bug report. > There are quite a few developers that can fix bugs in that bit of code. > > > James The reason I asked is that I can't log into the bugtrack system for some reason, so I wanted to send a patch directly to a maintainer. I posted the patch it to the group last Friday, but I don't think anyone noticed it. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobin Davis Subject: Re: ac97 maintenance Date: Wed, 06 Dec 2006 11:38:00 -0800 Message-ID: <1165433880.32312.243.camel@razman> References: <4576B0FB.6060402@sound4.biz> <1165432130.23056.13.camel@Rainsong> <45771798.1090906@superbug.co.uk> <1165433043.23056.17.camel@Rainsong> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0093257881==" Return-path: In-Reply-To: <1165433043.23056.17.camel@Rainsong> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: James C Georgas Cc: alsa-devel@lists.sourceforge.net, James Courtier-Dutton List-Id: alsa-devel@alsa-project.org --===============0093257881== Content-Type: multipart/alternative; boundary="=-I+D5ukDSncRhImkkbLS4" --=-I+D5ukDSncRhImkkbLS4 Content-Type: text/plain Content-Transfer-Encoding: 7bit Takashi usually applies the patches that are sent to the mailing list, but he is currently out on vacation. He's really good about catching up on these things, though, so it will make it in (unless there is a programming issue, which he will let you know about). I don't think there is really a formal process, though. Personally, I'd rather submit my patches to the list for review than directly into the repository. Helps me learn the correct coding style. Tobin On Wed, 2006-12-06 at 14:24 -0500, James C Georgas wrote: > On Wed, 2006-06-12 at 19:18 +0000, James Courtier-Dutton wrote: > > James C Georgas wrote: > > > Who is maintaining the ac97 stuff these days? > > > > > > > What sort of question is that? > > If you have a problem, raise a bug report. > > There are quite a few developers that can fix bugs in that bit of code. > > > > > > James > > The reason I asked is that I can't log into the bugtrack system for some > reason, so I wanted to send a patch directly to a maintainer. I posted > the patch it to the group last Friday, but I don't think anyone noticed > it. > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/alsa-devel -- Tobin Davis --=-I+D5ukDSncRhImkkbLS4 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Takashi usually applies the patches that are sent to the mailing list, but he is currently out on vacation.  He's really good about catching up on these things, though, so it will make it in (unless there is a programming issue, which he will let you know about).

I don't think there is really a formal process, though.  Personally, I'd rather submit my patches to the list for review than directly into the repository.  Helps me learn the correct coding style.

Tobin

On Wed, 2006-12-06 at 14:24 -0500, James C Georgas wrote:
On Wed, 2006-06-12 at 19:18 +0000, James Courtier-Dutton wrote:
> James C Georgas wrote:
> > Who is maintaining the ac97 stuff these days?
> > 
> 
> What sort of question is that?
> If you have a problem, raise a bug report.
> There are quite a few developers that can fix bugs in that bit of code.
> 
> 
> James

The reason I asked is that I can't log into the bugtrack system for some
reason, so I wanted to send a patch directly to a maintainer. I posted
the patch it to the group last Friday, but I don't think anyone noticed
it.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel
--
Tobin Davis <tdavis@dsl-only.net>
--=-I+D5ukDSncRhImkkbLS4-- --===============0093257881== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV --===============0093257881== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Alsa-devel mailing list Alsa-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-devel --===============0093257881==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Randy Cushman Subject: Re: ac97 maintenance Date: Wed, 06 Dec 2006 14:39:37 -0500 Message-ID: <45771C79.2090604@earthlink.net> References: <4576B0FB.6060402@sound4.biz> <1165432130.23056.13.camel@Rainsong> <45771798.1090906@superbug.co.uk> <1165433043.23056.17.camel@Rainsong> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1165433043.23056.17.camel@Rainsong> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org I also have posted a patch, and I am testing another. The impression I've gotten from reading bugtracker postings is that Takashi Iwai might be the person to accept our patches. He/she is on vacation, according to a message posted last week. Randy Cushman James C Georgas wrote: > On Wed, 2006-06-12 at 19:18 +0000, James Courtier-Dutton wrote: > >> James C Georgas wrote: >> >>> Who is maintaining the ac97 stuff these days? >>> >>> >> What sort of question is that? >> If you have a problem, raise a bug report. >> There are quite a few developers that can fix bugs in that bit of code. >> >> >> James >> > > The reason I asked is that I can't log into the bugtrack system for some > reason, so I wanted to send a patch directly to a maintainer. I posted > the patch it to the group last Friday, but I don't think anyone noticed > it. > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/alsa-devel > > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaroslav Kysela Subject: Re: ac97 maintenance Date: Wed, 6 Dec 2006 20:44:55 +0100 (CET) Message-ID: References: <4576B0FB.6060402@sound4.biz> <1165432130.23056.13.camel@Rainsong> <45771798.1090906@superbug.co.uk> <1165433043.23056.17.camel@Rainsong> <45771C79.2090604@earthlink.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <45771C79.2090604@earthlink.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: Randy Cushman Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org On Wed, 6 Dec 2006, Randy Cushman wrote: > I also have posted a patch, and I am testing another. > > The impression I've gotten from reading bugtracker postings is that > Takashi Iwai might be the person to accept our patches. He/she is on > vacation, according to a message posted last week. Please, post your patches to this mailing list for review or try ALSA BTS again (there was a smtp setup problem, but it should be ok now). We have more than one developer accepting patches. Thanks, Jaroslav ----- Jaroslav Kysela Linux Kernel Sound Maintainer ALSA Project, SUSE Labs ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV From mboxrd@z Thu Jan 1 00:00:00 1970 From: James C Georgas Subject: Re: ac97 maintenance Date: Wed, 06 Dec 2006 15:18:33 -0500 Message-ID: <1165436313.23056.53.camel@Rainsong> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org On Wed, 2006-06-12 at 20:44 +0100, Jaroslav Kysela wrote: > On Wed, 6 Dec 2006, Randy Cushman wrote: > > > I also have posted a patch, and I am testing another. > > > > The impression I've gotten from reading bugtracker postings is that > > Takashi Iwai might be the person to accept our patches. He/she is on > > vacation, according to a message posted last week. > > Please, post your patches to this mailing list for review or try > ALSA BTS again (there was a smtp setup problem, but it should be ok now). > We have more than one developer accepting patches. > > Thanks, > Jaroslav > Ok, yeah, my login failed ten minutes ago, but it's working now. Thanks to whoever fixed that. Here's my patch again, in case the old post got lost somehow: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Summary: trivial fix for bit update functions. This patch fixes a couple of bit update functions in alsa-kernel/pci/ac97/ac97_codec.c, which could possibly corrupt bits not in the given mask. Specifically, it'll clobber unset bits in the target that are not in the mask, when the corresponding bit in the given new value is set. Signed-off-by: James C Georgas diff -r bc7ef767d0cf pci/ac97/ac97_codec.c --- a/pci/ac97/ac97_codec.c Wed Nov 29 15:29:40 2006 +0100 +++ b/pci/ac97/ac97_codec.c Fri Dec 1 02:04:30 2006 -0500 @@ -389,7 +389,7 @@ int snd_ac97_update_bits_nolock(struct s unsigned short old, new; old = snd_ac97_read_cache(ac97, reg); - new = (old & ~mask) | value; + new = (old & ~mask) | (value & mask); change = old != new; if (change) { ac97->regs[reg] = new; @@ -406,7 +406,7 @@ static int snd_ac97_ad18xx_update_pcm_bi mutex_lock(&ac97->page_mutex); old = ac97->spec.ad18xx.pcmreg[codec]; - new = (old & ~mask) | value; + new = (old & ~mask) | (value & mask); change = old != new; if (change) { mutex_lock(&ac97->reg_mutex); ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV